php-general Digest 10 Jul 2003 10:18:09 -0000 Issue 2167
Topics (messages 154646 through 154697):
Windows 2k, Apache, MySQL, PHP 4.3.2, Smarty
154646 by: Michael Smith
Returning values from functions
154647 by: Jason Giangrande
154648 by: David Nicholson
154649 by: Jason Giangrande
154650 by: Jennifer Goodie
proxy... of a sorts.
154651 by: erythros
154652 by: David Nicholson
Re: New to PHP
154653 by: Ow Mun Heng
Re: include/require inside of function
154654 by: Ow Mun Heng
MySQL Results - display issue :S
154655 by: Brenton Dobell
154660 by: Miles Thompson
154662 by: David Robley
154675 by: Philip Olson
Re: TextArea vs. URLEncode/URLDecode/quotes
154656 by: Arcadius A.
Re: session data missing
154657 by: ulf sundin
Re: Object assignment
154658 by: Tom Rogers
154663 by: Tom Rogers
problem with php-4.3.2 and gblib 2 on apache server
154659 by: Tim Grote
154682 by: Jason Wong
Re: Using PHP with windows logon
154661 by: David Otton
Handling Credit Card Payment
154664 by: Student4
154673 by: Ralph Guzman
$_POST problem
154665 by: Micah Montoy
154666 by: Aaron Axelsen
154668 by: Micah Montoy
154669 by: Joe Harman
154670 by: Micah Montoy
154671 by: Aaron Axelsen
154672 by: Aaron Axelsen
154674 by: Philip Olson
154676 by: Joe Harman
154677 by: Micah Montoy
154678 by: Joe Harman
154679 by: Philip Olson
154680 by: myhan
Re: Create a Report
154667 by: cavagnaro
(REAL TUFFY ) Lat/Long Map Image Manipulation
154681 by: Joe Harman
Blatant newbie question - killing a session
154683 by: Bruce Bruen
saving BMP image
154684 by: jan
suexec
154685 by: Fejes Jozsef
154697 by: Marek Kilimajer
Re: shoutcast communication
154686 by: Simon Fredriksson
Re: mail() - how to attach file to the message???
154687 by: szparag
SQL select
154688 by: Jiøí Nìmec
154693 by: Marek Kilimajer
154695 by: sven
download php
154689 by: Mantas Kriauciunas
154694 by: Marek Kilimajer
/etc/passwd
154690 by: Mantas Kriauciunas
154696 by: Marek Kilimajer
Re: mcrypt warning
154691 by: Tom Rogers
Re: (pas d'objet)
154692 by: RIVES Sergio SOFRECOM
Administrivia:
To subscribe to the digest, e-mail:
[EMAIL PROTECTED]
To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]
To post to the list, e-mail:
[EMAIL PROTECTED]
----------------------------------------------------------------------
--- Begin Message ---
Problem with Smarty. My application is giving me an error when i try to
use smarty on a new WAMP install. Smarty is in my include path. Getting
this error:
*Fatal error*: Call to undefined function: () in
*c:\htdocs\smarty\Smarty.class.php* on line *1658
*line 1658 is:
$_source_return = $resource_func($resource_name, $template_source, $this);
I think it has something to do with PHP not liking the $resource_fun
being submitted for the function name. It works fine on my updated LAMP
environment.... any help woudl be much appreciated.
-Michael
--- End Message ---
--- Begin Message ---
I have a function that checks to see if a user has an active session and
if so I'd like it to return the value of a variable (the variable
$username). However, when I var_dump the variable it's value is NULL.
Anyone know why? Here's the function:
function auth_user($logged_in) {
if (isset($logged_in)) {
list($s_username, $hash) = explode(',',$logged_in);
global $secret_word;
if (md5($s_username.$secret_word) == $hash) {
$username = $s_username;
return $username;
} else {
die ("You have tampered with your session.");
}
} else {
die ("Sorry, you are not logged in. Please log in and try again.");
}
}
Here's the code that calls the function which is in another script.
auth_user($_SESSION['login']);
var_dump($username);
Thanks,
Jason Giangrande
--- End Message ---
--- Begin Message ---
Hello,
This is a reply to an e-mail that you wrote on Wed, 9 Jul 2003 at 23:40,
lines prefixed by '>' were originally written by you.
> auth_user($_SESSION['login']);
> var_dump($username);
You are not collecting the value that your function returns. Try:
$username = auth_user($_SESSION['login']);
var_dump($username);
David.
--
phpmachine :: The quick and easy to use service providing you with
professionally developed PHP scripts :: http://www.phpmachine.com/
Professional Web Development by David Nicholson
http://www.djnicholson.com/
QuizSender.com - How well do your friends actually know you?
http://www.quizsender.com/
(developed entirely in PHP)
--- End Message ---
--- Begin Message ---
Thanks. I'm new to PHP, but still I should have seen that. :-)
Jason
On Wed, 2003-07-09 at 18:44, David Nicholson wrote:
> Hello,
>
>
> This is a reply to an e-mail that you wrote on Wed, 9 Jul 2003 at 23:40,
> lines prefixed by '>' were originally written by you.
> > auth_user($_SESSION['login']);
> > var_dump($username);
>
> You are not collecting the value that your function returns. Try:
> $username = auth_user($_SESSION['login']);
> var_dump($username);
>
> David.
>
> --
> phpmachine :: The quick and easy to use service providing you with
> professionally developed PHP scripts :: http://www.phpmachine.com/
>
> Professional Web Development by David Nicholson
> http://www.djnicholson.com/
>
> QuizSender.com - How well do your friends actually know you?
> http://www.quizsender.com/
> (developed entirely in PHP)
--- End Message ---
--- Begin Message ---
> function auth_user($logged_in) {
> if (isset($logged_in)) {
> list($s_username, $hash) = explode(',',$logged_in);
> global $secret_word;
> if (md5($s_username.$secret_word) == $hash) {
> $username = $s_username;
> return $username;
> } else {
> die ("You have tampered with your session.");
> }
> } else {
> die ("Sorry, you are not logged in. Please log in and try again.");
> }
> }
> auth_user($_SESSION['login']);
> var_dump($username);
$username = auth_user($_SESSION['login']); will actually assign the returned
value to the variable $username. The $username variable in your function
does not have global scope and only exist in the function.
--- End Message ---
--- Begin Message ---
i wrote this in couple of hours. i havent really begun to develope it yet.
it works, but i'm sure there's probably better/safer/faster ways to do
certain parts. would anyone like to point out a few?
<?php
/*PROXY.PHP************************************\
* Check to see if a web address is present... *
* iproxy is where the imagaes are loaded *
* myproxy is the addres of the proxy php page *
\************************************************/
if(isset($_GET['web']))
{
$web = $_GET['web'];
$iproxy = '/image.php?image=';
$myproxy = 'http://www.domain.com/proxy.php?web=';
/************************************************\
* opens the remote page for reading and loads it *
* into alltext
*
\************************************************/
$fd = fopen($web,"r");
while ($line = fgets($fd,1024))
{
$alltext.=$line;
}
fclose ($fd);
/************************************************\
* removes current web address from the images *
\************************************************/
$alltext = ereg_replace('<img src="'.$web, '<img src="', $alltext);
/************************************************\
* strips the address down to its root unless it
*
* already is
*
\************************************************/
$web1 = dirname ($web);
if($web1 !== "http:")
{
$web = $web1;
}
/************************************************\
* removes current web address from the images, *
* background and url images, and links
*
* checks for all variants of img src...
*
* then prints it out onto the screen.
*
\************************************************/
$alltext = ereg_replace('<img src="'.$web, '<img src="', $alltext);
$alltext = ereg_replace('<img src= "', '<img src="', $alltext);
$alltext = ereg_replace('<img src ="', '<img src="', $alltext);
$alltext = ereg_replace('<img src = "', '<img src="', $alltext);
$alltext = ereg_replace('<img src="', '<img src="'.$iproxy.$web.'/',
$alltext);
$alltext = ereg_replace('<a href="/'.$web, '<a href="', $alltext);
$alltext = ereg_replace('<a href="/', '<a href="', $alltext);
$alltext = ereg_replace('<a href="', '<a href="'.$myproxy.$web.'/',
$alltext);
$alltext = ereg_replace('url\(', 'url('.$iproxy.$web.'/', $alltext);
$alltext = ereg_replace('background="', 'background="'.$iproxy.$web.'/',
$alltext);
echo $alltext;
}
?>
<?php
/*IMAGE.PHP*************************************\
* gets the image name an location from proxy.php *
* loads the image as image.php for proxy to call *
\************************************************/
$img = $_GET['image'];
$fd=fopen("$img","rb");
while ($line=fgets($fd,4096))
{
$alltext.=$line;
}
fclose ($fd);
echo $alltext;
?>
--- End Message ---
--- Begin Message ---
Hello,
This is a reply to an e-mail that you wrote on Thu, 10 Jul 2003 at 00:14,
lines prefixed by '>' were originally written by you.
Just a few things I picked up on while scanning your code...
> $alltext = ereg_replace('<img src="'.$web, '<img src="',
$alltext);
Some parts of the URL will be case insensitive i.e. the domain name and
protocol. The lazy way around this is to just use a case insenstive
regular expression here.
> $alltext = ereg_replace('<img src="'.$web, '<img src="',
$alltext);
> $alltext = ereg_replace('<img src= "', '<img src="',
$alltext);
> $alltext = ereg_replace('<img src ="', '<img src="',
$alltext);
> $alltext = ereg_replace('<img src = "', '<img src="',
$alltext);
> $alltext = ereg_replace('<img src="', '<img
src="'.$iproxy.$web.'/',
> $alltext);
This could all be done in one line, something like...
"/(<img.+src)( )*(=)( )*([\"'])?($web)([^ "']).*(>)/i"
but it is getting late here so that proably won't work exactly like that.
Also check for a <BASE HREF=....> tag, this can be used to set the first
part of the URL for any links, pictures etc that are not referenced by a
full URL anywhere in the page.
> /*IMAGE.PHP*************************************
You may want to record the headers the remote server gives you for the
images and send them on, or take a guess at them from the file name and
send them using the header() function.
All the best,
David.
--
phpmachine :: The quick and easy to use service providing you with
professionally developed PHP scripts :: http://www.phpmachine.com/
Professional Web Development by David Nicholson
http://www.djnicholson.com/
QuizSender.com - How well do your friends actually know you?
http://www.quizsender.com/
(developed entirely in PHP)
--- End Message ---
--- Begin Message ---
This is Way Kewl... I'm a part of a team!
Long Live Open Source..
I believe that if it were closed sourced, I would need a least 2x the amount
of time to learn how to code for someone not from an IT/Programming
background.
Cheers,
Mun Heng, Ow
H/M Engineering
Western Digital M'sia
DID : 03-7870 5168
-----Original Message-----
From: Ralph Guzman [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 10, 2003 3:23 AM
To: Ow Mun Heng; 'PHP'
Subject: RE: [PHP] New to PHP
Yes, and also the same Rasmus founder of PHP. From time to time he may
even respond to one of you questions. :-)
And you're right one of the best ways to learn is to look at other open
source code. I've learned how to write efficient code and also learned
programming tricks by studying other code.
Welcome to the team,
-----Original Message-----
From: Ow Mun Heng [mailto:[EMAIL PROTECTED]
Sent: Tuesday, July 08, 2003 7:52 PM
To: PHP
Subject: RE: [PHP] New to PHP
Wow.. There's a guy named Rasmus here. Is here(or u) the same person who
wrote that book? this is way cool..
Oh.. BTW, "PHP & Mysql Web Development" is GOOD.
Also, since a lot of codes are open sourced, Read through them as well.
I'm
learning through that too. (& this list)
Cheers,
Mun Heng, Ow
H/M Engineering
Western Digital M'sia
DID : 03-7870 5168
-----Original Message-----
From: Ralph [mailto:[EMAIL PROTECTED]
Sent: Tuesday, July 08, 2003 9:01 AM
To: 'Hiren Mehta'; 'PHP'
Subject: RE: [PHP] New to PHP
Here are some sites for you to get started:
http://www.zend.com/developers.php
http://www.phpcomplete.com/tutorials.php
http://www.evilwalrus.com/articles.php
And for books, here are some excellent books I've come across:
Programming PHP
By Rasmus Lerdorf
Web Application Development with PHP 4.0
by Tobias Ratschiller
Professional PHP4 Programming
By Deepak Thomas
-----Original Message-----
From: Hiren Mehta [mailto:[EMAIL PROTECTED]
Sent: Monday, July 07, 2003 2:28 PM
To: PHP
Subject: [PHP] New to PHP
Hi I am new to PHP and would like to learn more about it. Which would be
the best place to start with besides the manual and what would you
suggest is a pre-requiste for learning PHP.
Thanks
Regards,
Hiren
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
Hi Mike,
I realise that last night. I'm now using $GLOBALS['page_title']
In what situation would create_global() be useful then?
Thanks.
Cheers,
Mun Heng, Ow
H/M Engineering
Western Digital M'sia
DID : 03-7870 5168
-----Original Message-----
From: Ford, Mike [LSS] [mailto:[EMAIL PROTECTED]
Sent: Wednesday, July 09, 2003 6:20 PM
To: Ow Mun Heng; Ford, Mike [LSS]
Cc: [EMAIL PROTECTED]
Subject: RE: [PHP] include/require inside of function
> -----Original Message-----
> From: Ow Mun Heng [mailto:[EMAIL PROTECTED]
> Sent: 09 July 2003 03:44
>
> I finally got it. Thanks. All I needed to do was just
> define global
> $page_title inside the function to denote that I wanted to use that
> variable.
>
> One other quick question, in my original code (per below) the function
> create_global() was used to create_globals on demand. But
> this involved a
> lot of jumping, from one function to another just to create
> the globals on
> demand. Is this efficient (more?? less??) compared to just
> stating global
> $page_title inside the function?
I don't think create_global() is of any use to you in this situation --
you're just wasting the time taken to do the function call and return. Just
do either:
function org_display_title_code()
{
global $page_title;
echo 'This is title1 -> ' . $page_title;
}
Or:
function org_display_title_code()
{
echo 'This is title1 -> ' . $GLOBALS['page_title'];
}
Cheers!
Mike
---------------------------------------------------------------------
Mike Ford, Electronic Information Services Adviser,
Learning Support Services, Learning & Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Beckett Park, LEEDS, LS6 3QS, United Kingdom
Email: [EMAIL PROTECTED]
Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211
--- End Message ---
--- Begin Message ---
I know im probibly getting irritating to most of you :P but i thought i may
ask another thing that is on my mind!
I have a sql query bringing back 200 rows for arguments sake, From this i
would like an answer to 2 issues i have.
1) I know how to display it row after row going down :P duh of course :P,
but i have seen sites where it goes across then down across then down ect
ect like X -> X then next row ect. How is this done??
2) How can i alternate the colours for each row?? row 1 eg light blue and
the 2nd row dark blue then back to light blue ect ect.
Thanks in advance
Brenton Dobell
--- End Message ---
--- Begin Message ---
Brenton,
The short answer: loops, counters and test
Across - <td> your content </td> <td> and so forth </td>
When to stop - a cell counter tested with mod operator
Alternating colour - a row counter tested with mod operator
That should get you pointed in the right direction. (If this is for a
school project that might be too much info; what does your prof want?)
HTH - Miles Thompson
At 10:45 AM 7/10/2003 +0930, Brenton Dobell wrote:
I know im probibly getting irritating to most of you :P but i thought i may
ask another thing that is on my mind!
I have a sql query bringing back 200 rows for arguments sake, From this i
would like an answer to 2 issues i have.
1) I know how to display it row after row going down :P duh of course :P,
but i have seen sites where it goes across then down across then down ect
ect like X -> X then next row ect. How is this done??
2) How can i alternate the colours for each row?? row 1 eg light blue and
the 2nd row dark blue then back to light blue ect ect.
Thanks in advance
Brenton Dobell
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
In article <[EMAIL PROTECTED]>,
[EMAIL PROTECTED] says...
> I know im probibly getting irritating to most of you :P but i thought i may
> ask another thing that is on my mind!
>
> I have a sql query bringing back 200 rows for arguments sake, From this i
> would like an answer to 2 issues i have.
>
> 1) I know how to display it row after row going down :P duh of course :P,
> but i have seen sites where it goes across then down across then down ect
> ect like X -> X then next row ect. How is this done??
Easy enough; keep a count of how many records you have processed and use
the modulus operator % to determine where you want to start a new <TR>
> 2) How can i alternate the colours for each row?? row 1 eg light blue and
> the 2nd row dark blue then back to light blue ect ect.
There will be at least n different ways of doing this; one would be to
change the colour using the above test as a trigger. Another is via a
simple ternary operator test:
$bgcolour = ($bgcolour == '#FF0000' ? '#00FF00' : '##FF0000);
In other words if $bgcolour is currently red then make it blue else make
it red.
> Thanks in advance
>
--
Quod subigo farinam
--- End Message ---
--- Begin Message ---
On Thu, 10 Jul 2003, Brenton Dobell wrote:
> I know im probibly getting irritating to most of you :P but i thought i may
> ask another thing that is on my mind!
>
> I have a sql query bringing back 200 rows for arguments sake, From this i
> would like an answer to 2 issues i have.
>
> 1) I know how to display it row after row going down :P duh of course :P,
> but i have seen sites where it goes across then down across then down ect
> ect like X -> X then next row ect. How is this done??
http://www.faqts.com/knowledge_base/view.phtml/aid/8583
>
> 2) How can i alternate the colours for each row?? row 1 eg light blue and
> the 2nd row dark blue then back to light blue ect ect.
http://www.faqts.com/knowledge_base/view.phtml/aid/783
Regards,
Philip
--- End Message ---
--- Begin Message ---
"Marek Kilimajer" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> The correct way is:
> In validate.php:
> if(error) {
> if(magic_quotes) stripslashes();
> urlencode();
> } else {
> INSERT INTO ...
> }
>
> In form.php:
> // urldecode() is not needed, GET variables are already decoded
> if(magic_quotes) stripslashes();
> <textarea><?= htmlspecialchars()?></textarea>
>
>
Thanks!!! :-)
--- End Message ---
--- Begin Message ---
ok. now I get it. first set the session-variables like any other:
$foo = 'bar';
then register them in the sessionfile:
session_register('foo');
that makes sense. But it's not at all what the manual says. I guess my php
version has passed its expiration date.
thanks for the help, anyway. It seems to be working the way I wanted it to.
Regards
Ulf
"Kevin Stone" <[EMAIL PROTECTED]> skrev i meddelandet
news:[EMAIL PROTECTED]
>
> ----- Original Message -----
> From: "ulf sundin" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Wednesday, July 09, 2003 1:00 PM
> Subject: Re: [PHP] session data missing
>
>
> > ok, so now the variable names are registred and stored in the file. But
> > without values.
> > check this:
> >
> > --firstpage.php----
> > session_start()
> > session_register('foo');
> > $HTTP_SESSION_VARS['foo'] = 'bar';
> > echo $HTTP_SESSION_VARS['foo']; //outputs bar;
> >
> > transport by a href to:
> > ----secondpage.php----
> > session_start();
> > echo $HTTP_SESSION_VARS['foo']; //outputs nothing
> >
> > ---
> > checking the contents of the file called /tmp/sess_{session_id}:
> > !foo|
> (snip)
>
>
> Make a choice here..
>
> => session_register('foo');
> => $HTTP_SESSION_VARS['foo'] = 'bar';
>
> Use either the session_register() function or the session global array.
Not
> both.
>
> - Kevin
>
>
--- End Message ---
--- Begin Message ---
Hi,
Thursday, July 10, 2003, 6:44:55 AM, you wrote:
MG> Tom:
MG> Thanks for the help. Using the array setup you described, I end up with the
MG> value of each "record" node being appended to a single instance of the
MG> parent node. And that single instance of the parent node is the final one
MG> that was parsed (the attributes verify this). The example I used below is
MG> outputting this:
MG> <rootElement>
MG> <record id="2">Value 1Value 2</record>
MG> </rootElement>
MG> Any ideas?
Can you send me the bit of code or the array you are using so I can
see better what you are doing :)
Maybe I miss understood something
--
regards,
Tom
--- End Message ---
--- Begin Message ---
Hi,
Thursday, July 10, 2003, 6:44:55 AM, you wrote:
MG> Tom:
MG> Thanks for the help. Using the array setup you described, I end up with the
MG> value of each "record" node being appended to a single instance of the
MG> parent node. And that single instance of the parent node is the final one
MG> that was parsed (the attributes verify this). The example I used below is
MG> outputting this:
MG> <rootElement>
MG> <record id="2">Value 1Value 2</record>
MG> </rootElement>
MG> Any ideas?
It seems we now have to clone nodes before using them. (php-4.3 +)
I did this as a test:
$test =array(
1=>array('type'=>'record','value'=>'Value 1','id'=>1),
2=>array('type'=>'record','value'=>'Value 2','id'=>2));
$elements = array();
$doc = domxml_new_doc("1.0");
//create a dummy document
ob_start();
echo <<<END
<rootelement>
</rootelement>
END;
$buffer = ob_get_contents();
ob_end_clean();
$doc = domxml_open_mem($buffer);
//get the root element
$ancestor = $doc->document_element();
//loop
foreach($test as $val){
$key = $val['type'];
$value = $val['value'];
$id = $val['id'];
if(!isset($elements[$key])){
$elements[$key] = $doc->create_element($key);
}
$thisChild = $ancestor->append_child($elements[$key]->clone_node());//<<<<clone
$thisChild->set_attribute('id',$id);
$txt = $doc->create_text_node($value);
$thisChild->append_child($txt);
}
//end loop
echo '<pre>';
echo htmlentities($doc->dump_mem(true));
echo '</pre>';
Gave me
<?xml version="1.0"?>
<rootelement>
<record id="1">Value 1</record><record id="2">Value 2</record></rootelement>
--
regards,
Tom
--- End Message ---
--- Begin Message ---
Hello people,
I updated my linux apache server to php-4.3.2. It works fine but the
promised 'embedded' gdlib 2 doesnt seem to work. gd_info always ends in
'call to undefined function'.
Can anybody tell me what's wrong or how to get gdlib 2 working?
Thanks.
--- End Message ---
--- Begin Message ---
On Thursday 10 July 2003 09:41, Tim Grote wrote:
> I updated my linux apache server to php-4.3.2. It works fine but the
> promised 'embedded' gdlib 2 doesnt seem to work. gd_info always ends in
> 'call to undefined function'.
>
> Can anybody tell me what's wrong or how to get gdlib 2 working?
Was php compiled with gd support? manual > Image functions for info.
--
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
------------------------------------------
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
------------------------------------------
/*
Lewis's Law of Travel:
The first piece of luggage out of the chute doesn't belong to anyone,
ever.
*/
--- End Message ---
--- Begin Message ---
On Wed, 9 Jul 2003 19:02:21 +0930, you wrote:
>can you use your windows logon as set it as a variable in php??
>
>eg I log onto a windows machine using brenton can i use a php script to set
>that as a variable, I have seen a similar type function before but i have no
>idea how it works, I know windows sets the variable %username% that as a
>network administrator i use in shortcuts to point to their home drive..
The name the remote user logged in as on the client machine, or the user the
script is running under on the server? It's not really clear.
get_current_user() does work under Windows.
If you're trying to authenticate a user on an intranet... well, there's
LDAP, or NTLM. I've seen NTLM authentication done with PHP under IIS, and
there are NTML modules for Apache - http://modntlm.sourceforge.net/
--- End Message ---
--- Begin Message ---
dear all
hello im new user. i want create e-comerce site but i dont know how to
handle credit card paying, procedure, maintenence, etc. can anybody help me?
regard,
xmadda
--- End Message ---
--- Begin Message ---
If you will be processing credit cards you first need to sign up with a
credit card processor like Authorize.net, PSIGate.com, Netbilling.com.
Another alternative would be use PayPal which is a bit easier to
implement but at the cost of flexibility.
They will provide you with a gateway to which you will submit your
shopping cart orders. Gateways vary but the process is usually the same.
You might want to read Authorize.net or any other cc processors manual
to get a better idea of how it works. Here is authorize.net maual:
http://www.authorizenet.com/support/AIM_guide_SCC.pdf
-----Original Message-----
From: Student4 [mailto:[EMAIL PROTECTED]
Sent: Wednesday, July 09, 2003 7:51 PM
To: '[EMAIL PROTECTED]'
Subject: [PHP] Handling Credit Card Payment
dear all
hello im new user. i want create e-comerce site but i dont know how to
handle credit card paying, procedure, maintenence, etc. can anybody help
me?
regard,
xmadda
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
Anyone see what when I submit this, I can't do a $_POST on it? I check with
the DB first to see if there is a value and if so, I fill it, otherwise, it
will return a blank for the user to fill if they want.
<input type="text" name="keywords" value="<?php echo("$new_keywords"); ?>"
size="53" maxlength="500">
On the page that it goes to when it is submitted, the post looks like this:
$img_keywords = trim($_POST["keywords"]);
thanks
--- End Message ---
--- Begin Message ---
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Try:
$img_keywords = trim({$_POST["keywords"]});
- ---
Aaron Axelsen
AIM: AAAK2
Email: [EMAIL PROTECTED]
Want reliable web hosting at affordable prices?
www.modevia.com
Web Dev/Design Community/Zine
www.developercube.com
- -----Original Message-----
From: Micah Montoy [mailto:[EMAIL PROTECTED]
Sent: Wednesday, July 09, 2003 10:26 PM
To: [EMAIL PROTECTED]
Subject: [PHP] $_POST problem
Anyone see what when I submit this, I can't do a $_POST on it? I
check with the DB first to see if there is a value and if so, I fill
it, otherwise, it will return a blank for the user to fill if they
want.
<input type="text" name="keywords" value="<?php
echo("$new_keywords"); ?>" size="53" maxlength="500">
On the page that it goes to when it is submitted, the post looks like
this:
$img_keywords = trim($_POST["keywords"]);
thanks
- --
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 7.0.3 for non-commercial use <http://www.pgp.com>
iQA/AwUBPwzdn7rnDjSLw9ADEQIcCQCgkktDGf9u26bOntsqMPw93lpINdcAoM9h
tVqNcesMuM/L3fZaXmIdKdId
=fJlG
-----END PGP SIGNATURE-----
--- End Message ---
--- Begin Message ---
Nope. That didn't do it. The errors I'm receiving are:
Notice: Undefined index: keywords in
c:\inetpub\wwwroot\webpage10\example\v_images\dsp_update_image.php on line
22
and
Notice: Undefined variable: img_keywords in
c:\inetpub\wwwroot\webpage10\example\v_images\dsp_update_image.php on line
29
thanks
"Aaron Axelsen" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Try:
>
> $img_keywords = trim({$_POST["keywords"]});
>
> - ---
> Aaron Axelsen
> AIM: AAAK2
> Email: [EMAIL PROTECTED]
>
> Want reliable web hosting at affordable prices?
> www.modevia.com
>
> Web Dev/Design Community/Zine
> www.developercube.com
>
>
>
> - -----Original Message-----
> From: Micah Montoy [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, July 09, 2003 10:26 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] $_POST problem
>
>
> Anyone see what when I submit this, I can't do a $_POST on it? I
> check with the DB first to see if there is a value and if so, I fill
> it, otherwise, it will return a blank for the user to fill if they
> want.
>
> <input type="text" name="keywords" value="<?php
> echo("$new_keywords"); ?>" size="53" maxlength="500">
>
> On the page that it goes to when it is submitted, the post looks like
> this:
>
> $img_keywords = trim($_POST["keywords"]);
>
>
> thanks
>
>
>
> - --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
> -----BEGIN PGP SIGNATURE-----
> Version: PGPfreeware 7.0.3 for non-commercial use <http://www.pgp.com>
>
> iQA/AwUBPwzdn7rnDjSLw9ADEQIcCQCgkktDGf9u26bOntsqMPw93lpINdcAoM9h
> tVqNcesMuM/L3fZaXmIdKdId
> =fJlG
> -----END PGP SIGNATURE-----
>
>
--- End Message ---
--- Begin Message ---
Hey... Just for Sh** and giggles... Try removing the quotes from
keywords
Make it look like this...
$img_keywords = trim({$_POST[keywords]})
Hmmm..... Something is up here... Never seen curly brackets used like
this... But that would probably be normal for me.... LOL....just thought
I point out anything unusual...
-----Original Message-----
From: Micah Montoy [mailto:[EMAIL PROTECTED]
Sent: Wednesday, July 09, 2003 11:57 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] $_POST problem
Nope. That didn't do it. The errors I'm receiving are:
Notice: Undefined index: keywords in
c:\inetpub\wwwroot\webpage10\example\v_images\dsp_update_image.php on
line 22 and
Notice: Undefined variable: img_keywords in
c:\inetpub\wwwroot\webpage10\example\v_images\dsp_update_image.php on
line 29
thanks
"Aaron Axelsen" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Try:
>
> $img_keywords = trim({$_POST["keywords"]});
>
> - ---
> Aaron Axelsen
> AIM: AAAK2
> Email: [EMAIL PROTECTED]
>
> Want reliable web hosting at affordable prices? www.modevia.com
>
> Web Dev/Design Community/Zine
> www.developercube.com
>
>
>
> - -----Original Message-----
> From: Micah Montoy [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, July 09, 2003 10:26 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] $_POST problem
>
>
> Anyone see what when I submit this, I can't do a $_POST on it? I
> check with the DB first to see if there is a value and if so, I fill
> it, otherwise, it will return a blank for the user to fill if they
> want.
>
> <input type="text" name="keywords" value="<?php echo("$new_keywords");
> ?>" size="53" maxlength="500">
>
> On the page that it goes to when it is submitted, the post looks like
> this:
>
> $img_keywords = trim($_POST["keywords"]);
>
>
> thanks
>
>
>
> - --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
> -----BEGIN PGP SIGNATURE-----
> Version: PGPfreeware 7.0.3 for non-commercial use <http://www.pgp.com>
>
> iQA/AwUBPwzdn7rnDjSLw9ADEQIcCQCgkktDGf9u26bOntsqMPw93lpINdcAoM9h
> tVqNcesMuM/L3fZaXmIdKdId
> =fJlG
> -----END PGP SIGNATURE-----
>
>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
Didn't make a difference. Still getting the errors.
"Joe Harman" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hey... Just for Sh** and giggles... Try removing the quotes from
> keywords
>
> Make it look like this...
>
> $img_keywords = trim({$_POST[keywords]})
>
> Hmmm..... Something is up here... Never seen curly brackets used like
> this... But that would probably be normal for me.... LOL....just thought
> I point out anything unusual...
>
>
>
> -----Original Message-----
> From: Micah Montoy [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, July 09, 2003 11:57 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP] $_POST problem
>
>
> Nope. That didn't do it. The errors I'm receiving are:
>
> Notice: Undefined index: keywords in
> c:\inetpub\wwwroot\webpage10\example\v_images\dsp_update_image.php on
> line 22 and
>
> Notice: Undefined variable: img_keywords in
> c:\inetpub\wwwroot\webpage10\example\v_images\dsp_update_image.php on
> line 29
>
> thanks
>
> "Aaron Axelsen" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> >
> > -----BEGIN PGP SIGNED MESSAGE-----
> > Hash: SHA1
> >
> > Try:
> >
> > $img_keywords = trim({$_POST["keywords"]});
> >
> > - ---
> > Aaron Axelsen
> > AIM: AAAK2
> > Email: [EMAIL PROTECTED]
> >
> > Want reliable web hosting at affordable prices? www.modevia.com
> >
> > Web Dev/Design Community/Zine
> > www.developercube.com
> >
> >
> >
> > - -----Original Message-----
> > From: Micah Montoy [mailto:[EMAIL PROTECTED]
> > Sent: Wednesday, July 09, 2003 10:26 PM
> > To: [EMAIL PROTECTED]
> > Subject: [PHP] $_POST problem
> >
> >
> > Anyone see what when I submit this, I can't do a $_POST on it? I
> > check with the DB first to see if there is a value and if so, I fill
> > it, otherwise, it will return a blank for the user to fill if they
> > want.
> >
> > <input type="text" name="keywords" value="<?php echo("$new_keywords");
>
> > ?>" size="53" maxlength="500">
> >
> > On the page that it goes to when it is submitted, the post looks like
> > this:
> >
> > $img_keywords = trim($_POST["keywords"]);
> >
> >
> > thanks
> >
> >
> >
> > - --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
> > -----BEGIN PGP SIGNATURE-----
> > Version: PGPfreeware 7.0.3 for non-commercial use <http://www.pgp.com>
> >
> > iQA/AwUBPwzdn7rnDjSLw9ADEQIcCQCgkktDGf9u26bOntsqMPw93lpINdcAoM9h
> > tVqNcesMuM/L3fZaXmIdKdId
> > =fJlG
> > -----END PGP SIGNATURE-----
> >
> >
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>
--- End Message ---
--- Begin Message ---
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Sometimes in situatinos like that, it does the trick for me, im not
really sure why though .., I just now it works :)
- ---
Aaron Axelsen
AIM: AAAK2
Email: [EMAIL PROTECTED]
Want reliable web hosting at affordable prices?
www.modevia.com
Web Dev/Design Community/Zine
www.developercube.com
- -----Original Message-----
From: Joe Harman [mailto:[EMAIL PROTECTED]
Sent: Wednesday, July 09, 2003 11:09 PM
To: 'Micah Montoy'; [EMAIL PROTECTED]
Subject: RE: [PHP] $_POST problem
Hey... Just for Sh** and giggles... Try removing the quotes from
keywords
Make it look like this...
$img_keywords = trim({$_POST[keywords]})
Hmmm..... Something is up here... Never seen curly brackets used like
this... But that would probably be normal for me.... LOL....just
thought I point out anything unusual...
- -----Original Message-----
From: Micah Montoy [mailto:[EMAIL PROTECTED]
Sent: Wednesday, July 09, 2003 11:57 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] $_POST problem
Nope. That didn't do it. The errors I'm receiving are:
Notice: Undefined index: keywords in
c:\inetpub\wwwroot\webpage10\example\v_images\dsp_update_image.php on
line 22 and
Notice: Undefined variable: img_keywords in
c:\inetpub\wwwroot\webpage10\example\v_images\dsp_update_image.php on
line 29
thanks
"Aaron Axelsen" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Try:
>
> $img_keywords = trim({$_POST["keywords"]});
>
> - ---
> Aaron Axelsen
> AIM: AAAK2
> Email: [EMAIL PROTECTED]
>
> Want reliable web hosting at affordable prices? www.modevia.com
>
> Web Dev/Design Community/Zine
> www.developercube.com
>
>
>
> - -----Original Message-----
> From: Micah Montoy [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, July 09, 2003 10:26 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] $_POST problem
>
>
> Anyone see what when I submit this, I can't do a $_POST on it? I
> check with the DB first to see if there is a value and if so, I
> fill it, otherwise, it will return a blank for the user to fill if
> they want.
>
> <input type="text" name="keywords" value="<?php
> echo("$new_keywords");
> ?>" size="53" maxlength="500">
>
> On the page that it goes to when it is submitted, the post looks
> like this:
>
> $img_keywords = trim($_POST["keywords"]);
>
>
> thanks
>
>
>
> - --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
> -----BEGIN PGP SIGNATURE-----
> Version: PGPfreeware 7.0.3 for non-commercial use
> <http://www.pgp.com>
>
> iQA/AwUBPwzdn7rnDjSLw9ADEQIcCQCgkktDGf9u26bOntsqMPw93lpINdcAoM9h
> tVqNcesMuM/L3fZaXmIdKdId
> =fJlG
> -----END PGP SIGNATURE-----
>
>
- --
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
- --
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 7.0.3 for non-commercial use <http://www.pgp.com>
iQA+AwUBPwzqPLrnDjSLw9ADEQKPYgCgjokK/dQZwk10ylF+5Pjpz2YANisAmNGk
LTtC/a1boJlKfxXawTNyDPs=
=ptOt
-----END PGP SIGNATURE-----
--- End Message ---
--- Begin Message ---
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Whenever I call a vriable, I do something like $_POST['keyword']
Are you just getting a parse error?
- ---
Aaron Axelsen
AIM: AAAK2
Email: [EMAIL PROTECTED]
Want reliable web hosting at affordable prices?
www.modevia.com
Web Dev/Design Community/Zine
www.developercube.com
- -----Original Message-----
From: Micah Montoy [mailto:[EMAIL PROTECTED]
Sent: Wednesday, July 09, 2003 11:21 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] $_POST problem
Didn't make a difference. Still getting the errors.
"Joe Harman" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hey... Just for Sh** and giggles... Try removing the quotes from
> keywords
>
> Make it look like this...
>
> $img_keywords = trim({$_POST[keywords]})
>
> Hmmm..... Something is up here... Never seen curly brackets used
> like this... But that would probably be normal for me....
> LOL....just
> thought I point out anything unusual...
>
>
>
> -----Original Message-----
> From: Micah Montoy [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, July 09, 2003 11:57 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP] $_POST problem
>
>
> Nope. That didn't do it. The errors I'm receiving are:
>
> Notice: Undefined index: keywords in
> c:\inetpub\wwwroot\webpage10\example\v_images\dsp_update_image.php
> on line 22 and
>
> Notice: Undefined variable: img_keywords in
> c:\inetpub\wwwroot\webpage10\example\v_images\dsp_update_image.php
> on line 29
>
> thanks
>
> "Aaron Axelsen" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> >
> > -----BEGIN PGP SIGNED MESSAGE-----
> > Hash: SHA1
> >
> > Try:
> >
> > $img_keywords = trim({$_POST["keywords"]});
> >
> > - ---
> > Aaron Axelsen
> > AIM: AAAK2
> > Email: [EMAIL PROTECTED]
> >
> > Want reliable web hosting at affordable prices? www.modevia.com
> >
> > Web Dev/Design Community/Zine
> > www.developercube.com
> >
> >
> >
> > - -----Original Message-----
> > From: Micah Montoy [mailto:[EMAIL PROTECTED]
> > Sent: Wednesday, July 09, 2003 10:26 PM
> > To: [EMAIL PROTECTED]
> > Subject: [PHP] $_POST problem
> >
> >
> > Anyone see what when I submit this, I can't do a $_POST on it? I
> > check with the DB first to see if there is a value and if so, I
> > fill it, otherwise, it will return a blank for the user to fill
> > if they want.
> >
> > <input type="text" name="keywords" value="<?php
> > echo("$new_keywords");
>
> > ?>" size="53" maxlength="500">
> >
> > On the page that it goes to when it is submitted, the post looks
> > like
> > this:
> >
> > $img_keywords = trim($_POST["keywords"]);
> >
> >
> > thanks
> >
> >
> >
> > - --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
> > -----BEGIN PGP SIGNATURE-----
> > Version: PGPfreeware 7.0.3 for non-commercial use
> > <http://www.pgp.com>
> >
> > iQA/AwUBPwzdn7rnDjSLw9ADEQIcCQCgkktDGf9u26bOntsqMPw93lpINdcAoM9h
> > tVqNcesMuM/L3fZaXmIdKdId
> > =fJlG
> > -----END PGP SIGNATURE-----
> >
> >
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>
- --
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 7.0.3 for non-commercial use <http://www.pgp.com>
iQA/AwUBPwzq0rrnDjSLw9ADEQIGnACfbrvO1NUgRj11QHK9stcM1Tir250AoOeA
AHg0A8YeasOSjhaFIlZoEadb
=qWEI
-----END PGP SIGNATURE-----
--- End Message ---
--- Begin Message ---
The only time you want to use {braces} like that is
when you are in a string. None of the suggestions
here are in strings, so the use of {braces} is bogus.
The following is good:
echo "Hello {$there['friend']} is good";
Note how we're in a string. This topic is very much
discussed (with loads of examples) here:
http://www.php.net/types.string
Regarding the question in this thread, it's not clear
what you're problem is. If the form is method POST,
and you have at least PHP version 4.1.0, there is a
100% chance that the name/value will live in $_POST.
<input type="text" name="foo">
echo $_POST['foo'];
Not sure what the question is, could you be a little
more clear? It seems you are mixing up img_keywords
and new_keywords, maybe that's it. Debugging101
would say to check what's in $_POST, which could be:
print_r($_POST);
Regards,
Philip
On Wed, 9 Jul 2003, Aaron Axelsen wrote:
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Sometimes in situatinos like that, it does the trick for me, im not
> really sure why though .., I just now it works :)
>
> - ---
> Aaron Axelsen
> AIM: AAAK2
> Email: [EMAIL PROTECTED]
>
> Want reliable web hosting at affordable prices?
> www.modevia.com
>
> Web Dev/Design Community/Zine
> www.developercube.com
>
>
>
> - -----Original Message-----
> From: Joe Harman [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, July 09, 2003 11:09 PM
> To: 'Micah Montoy'; [EMAIL PROTECTED]
> Subject: RE: [PHP] $_POST problem
>
>
> Hey... Just for Sh** and giggles... Try removing the quotes from
> keywords
>
> Make it look like this...
>
> $img_keywords = trim({$_POST[keywords]})
>
> Hmmm..... Something is up here... Never seen curly brackets used like
> this... But that would probably be normal for me.... LOL....just
> thought I point out anything unusual...
>
>
>
> - -----Original Message-----
> From: Micah Montoy [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, July 09, 2003 11:57 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP] $_POST problem
>
>
> Nope. That didn't do it. The errors I'm receiving are:
>
> Notice: Undefined index: keywords in
> c:\inetpub\wwwroot\webpage10\example\v_images\dsp_update_image.php on
> line 22 and
>
> Notice: Undefined variable: img_keywords in
> c:\inetpub\wwwroot\webpage10\example\v_images\dsp_update_image.php on
> line 29
>
> thanks
>
> "Aaron Axelsen" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> >
> > -----BEGIN PGP SIGNED MESSAGE-----
> > Hash: SHA1
> >
> > Try:
> >
> > $img_keywords = trim({$_POST["keywords"]});
> >
> > - ---
> > Aaron Axelsen
> > AIM: AAAK2
> > Email: [EMAIL PROTECTED]
> >
> > Want reliable web hosting at affordable prices? www.modevia.com
> >
> > Web Dev/Design Community/Zine
> > www.developercube.com
> >
> >
> >
> > - -----Original Message-----
> > From: Micah Montoy [mailto:[EMAIL PROTECTED]
> > Sent: Wednesday, July 09, 2003 10:26 PM
> > To: [EMAIL PROTECTED]
> > Subject: [PHP] $_POST problem
> >
> >
> > Anyone see what when I submit this, I can't do a $_POST on it? I
> > check with the DB first to see if there is a value and if so, I
> > fill it, otherwise, it will return a blank for the user to fill if
> > they want.
> >
> > <input type="text" name="keywords" value="<?php
> > echo("$new_keywords");
>
> > ?>" size="53" maxlength="500">
> >
> > On the page that it goes to when it is submitted, the post looks
> > like this:
> >
> > $img_keywords = trim($_POST["keywords"]);
> >
> >
> > thanks
> >
> >
> >
> > - --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
> > -----BEGIN PGP SIGNATURE-----
> > Version: PGPfreeware 7.0.3 for non-commercial use
> > <http://www.pgp.com>
> >
> > iQA/AwUBPwzdn7rnDjSLw9ADEQIcCQCgkktDGf9u26bOntsqMPw93lpINdcAoM9h
> > tVqNcesMuM/L3fZaXmIdKdId
> > =fJlG
> > -----END PGP SIGNATURE-----
> >
> >
>
>
>
> - --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>
>
> - --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
> -----BEGIN PGP SIGNATURE-----
> Version: PGPfreeware 7.0.3 for non-commercial use <http://www.pgp.com>
>
> iQA+AwUBPwzqPLrnDjSLw9ADEQKPYgCgjokK/dQZwk10ylF+5Pjpz2YANisAmNGk
> LTtC/a1boJlKfxXawTNyDPs=
> =ptOt
> -----END PGP SIGNATURE-----
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
--- End Message ---
--- Begin Message ---
Yeah, me too... LOL... Although, I don't understand the curly
brackets... I don't see any examples using them in the manual either...
http://us4.php.net/trim
Try this
$img_keywords = trim($_POST['keywords'])
or this
$PassItOn=$_POST['keywords'];
$img_keywords = trim($PassItOn);
-----Original Message-----
From: Aaron Axelsen [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 10, 2003 12:26 AM
To: 'Micah Montoy'; [EMAIL PROTECTED]
Subject: RE: [PHP] $_POST problem
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Whenever I call a vriable, I do something like $_POST['keyword']
Are you just getting a parse error?
- ---
Aaron Axelsen
AIM: AAAK2
Email: [EMAIL PROTECTED]
Want reliable web hosting at affordable prices?
www.modevia.com
Web Dev/Design Community/Zine
www.developercube.com
- -----Original Message-----
From: Micah Montoy [mailto:[EMAIL PROTECTED]
Sent: Wednesday, July 09, 2003 11:21 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] $_POST problem
Didn't make a difference. Still getting the errors.
"Joe Harman" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hey... Just for Sh** and giggles... Try removing the quotes from
> keywords
>
> Make it look like this...
>
> $img_keywords = trim({$_POST[keywords]})
>
> Hmmm..... Something is up here... Never seen curly brackets used like
> this... But that would probably be normal for me.... LOL....just
> thought I point out anything unusual...
>
>
>
> -----Original Message-----
> From: Micah Montoy [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, July 09, 2003 11:57 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP] $_POST problem
>
>
> Nope. That didn't do it. The errors I'm receiving are:
>
> Notice: Undefined index: keywords in
> c:\inetpub\wwwroot\webpage10\example\v_images\dsp_update_image.php
> on line 22 and
>
> Notice: Undefined variable: img_keywords in
> c:\inetpub\wwwroot\webpage10\example\v_images\dsp_update_image.php
> on line 29
>
> thanks
>
> "Aaron Axelsen" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> >
> > -----BEGIN PGP SIGNED MESSAGE-----
> > Hash: SHA1
> >
> > Try:
> >
> > $img_keywords = trim({$_POST["keywords"]});
> >
> > - ---
> > Aaron Axelsen
> > AIM: AAAK2
> > Email: [EMAIL PROTECTED]
> >
> > Want reliable web hosting at affordable prices? www.modevia.com
> >
> > Web Dev/Design Community/Zine
> > www.developercube.com
> >
> >
> >
> > - -----Original Message-----
> > From: Micah Montoy [mailto:[EMAIL PROTECTED]
> > Sent: Wednesday, July 09, 2003 10:26 PM
> > To: [EMAIL PROTECTED]
> > Subject: [PHP] $_POST problem
> >
> >
> > Anyone see what when I submit this, I can't do a $_POST on it? I
> > check with the DB first to see if there is a value and if so, I
> > fill it, otherwise, it will return a blank for the user to fill
> > if they want.
> >
> > <input type="text" name="keywords" value="<?php
> > echo("$new_keywords");
>
> > ?>" size="53" maxlength="500">
> >
> > On the page that it goes to when it is submitted, the post looks
> > like
> > this:
> >
> > $img_keywords = trim($_POST["keywords"]);
> >
> >
> > thanks
> >
> >
> >
> > - --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
> > -----BEGIN PGP SIGNATURE-----
> > Version: PGPfreeware 7.0.3 for non-commercial use
> > <http://www.pgp.com>
> >
> > iQA/AwUBPwzdn7rnDjSLw9ADEQIcCQCgkktDGf9u26bOntsqMPw93lpINdcAoM9h
> > tVqNcesMuM/L3fZaXmIdKdId
> > =fJlG
> > -----END PGP SIGNATURE-----
> >
> >
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>
- --
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 7.0.3 for non-commercial use <http://www.pgp.com>
iQA/AwUBPwzq0rrnDjSLw9ADEQIGnACfbrvO1NUgRj11QHK9stcM1Tir250AoOeA
AHg0A8YeasOSjhaFIlZoEadb
=qWEI
-----END PGP SIGNATURE-----
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
I found the error. Your all probably all going to kill me but on the form
itself, I didn't specify a method. Sometimes I think I've been looking at a
screen way to long.
thanks for all your help
"Joe Harman" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hey... Just for Sh** and giggles... Try removing the quotes from
> keywords
>
> Make it look like this...
>
> $img_keywords = trim({$_POST[keywords]})
>
> Hmmm..... Something is up here... Never seen curly brackets used like
> this... But that would probably be normal for me.... LOL....just thought
> I point out anything unusual...
>
>
>
> -----Original Message-----
> From: Micah Montoy [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, July 09, 2003 11:57 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP] $_POST problem
>
>
> Nope. That didn't do it. The errors I'm receiving are:
>
> Notice: Undefined index: keywords in
> c:\inetpub\wwwroot\webpage10\example\v_images\dsp_update_image.php on
> line 22 and
>
> Notice: Undefined variable: img_keywords in
> c:\inetpub\wwwroot\webpage10\example\v_images\dsp_update_image.php on
> line 29
>
> thanks
>
> "Aaron Axelsen" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> >
> > -----BEGIN PGP SIGNED MESSAGE-----
> > Hash: SHA1
> >
> > Try:
> >
> > $img_keywords = trim({$_POST["keywords"]});
> >
> > - ---
> > Aaron Axelsen
> > AIM: AAAK2
> > Email: [EMAIL PROTECTED]
> >
> > Want reliable web hosting at affordable prices? www.modevia.com
> >
> > Web Dev/Design Community/Zine
> > www.developercube.com
> >
> >
> >
> > - -----Original Message-----
> > From: Micah Montoy [mailto:[EMAIL PROTECTED]
> > Sent: Wednesday, July 09, 2003 10:26 PM
> > To: [EMAIL PROTECTED]
> > Subject: [PHP] $_POST problem
> >
> >
> > Anyone see what when I submit this, I can't do a $_POST on it? I
> > check with the DB first to see if there is a value and if so, I fill
> > it, otherwise, it will return a blank for the user to fill if they
> > want.
> >
> > <input type="text" name="keywords" value="<?php echo("$new_keywords");
>
> > ?>" size="53" maxlength="500">
> >
> > On the page that it goes to when it is submitted, the post looks like
> > this:
> >
> > $img_keywords = trim($_POST["keywords"]);
> >
> >
> > thanks
> >
> >
> >
> > - --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
> > -----BEGIN PGP SIGNATURE-----
> > Version: PGPfreeware 7.0.3 for non-commercial use <http://www.pgp.com>
> >
> > iQA/AwUBPwzdn7rnDjSLw9ADEQIcCQCgkktDGf9u26bOntsqMPw93lpINdcAoM9h
> > tVqNcesMuM/L3fZaXmIdKdId
> > =fJlG
> > -----END PGP SIGNATURE-----
> >
> >
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>
--- End Message ---
--- Begin Message ---
LOL... I was running out of silly tricks to pull out of my hat....
LOL... Hey no problem Micah... I do this about 3 or 4 times a day....
Especially when my right brain takes over and the ADD sets in...
Have a great one!
Joe
-----Original Message-----
From: Micah Montoy [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 10, 2003 12:40 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] $_POST problem
I found the error. Your all probably all going to kill me but on the
form itself, I didn't specify a method. Sometimes I think I've been
looking at a screen way to long.
thanks for all your help
"Joe Harman" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hey... Just for Sh** and giggles... Try removing the quotes from
> keywords
>
> Make it look like this...
>
> $img_keywords = trim({$_POST[keywords]})
>
> Hmmm..... Something is up here... Never seen curly brackets used like
> this... But that would probably be normal for me.... LOL....just
> thought I point out anything unusual...
>
>
>
> -----Original Message-----
> From: Micah Montoy [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, July 09, 2003 11:57 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP] $_POST problem
>
>
> Nope. That didn't do it. The errors I'm receiving are:
>
> Notice: Undefined index: keywords in
> c:\inetpub\wwwroot\webpage10\example\v_images\dsp_update_image.php on
> line 22 and
>
> Notice: Undefined variable: img_keywords in
> c:\inetpub\wwwroot\webpage10\example\v_images\dsp_update_image.php on
> line 29
>
> thanks
>
> "Aaron Axelsen" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> >
> > -----BEGIN PGP SIGNED MESSAGE-----
> > Hash: SHA1
> >
> > Try:
> >
> > $img_keywords = trim({$_POST["keywords"]});
> >
> > - ---
> > Aaron Axelsen
> > AIM: AAAK2
> > Email: [EMAIL PROTECTED]
> >
> > Want reliable web hosting at affordable prices? www.modevia.com
> >
> > Web Dev/Design Community/Zine
> > www.developercube.com
> >
> >
> >
> > - -----Original Message-----
> > From: Micah Montoy [mailto:[EMAIL PROTECTED]
> > Sent: Wednesday, July 09, 2003 10:26 PM
> > To: [EMAIL PROTECTED]
> > Subject: [PHP] $_POST problem
> >
> >
> > Anyone see what when I submit this, I can't do a $_POST on it? I
> > check with the DB first to see if there is a value and if so, I fill
> > it, otherwise, it will return a blank for the user to fill if they
> > want.
> >
> > <input type="text" name="keywords" value="<?php
> > echo("$new_keywords");
>
> > ?>" size="53" maxlength="500">
> >
> > On the page that it goes to when it is submitted, the post looks
> > like
> > this:
> >
> > $img_keywords = trim($_POST["keywords"]);
> >
> >
> > thanks
> >
> >
> >
> > - --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
> > -----BEGIN PGP SIGNATURE-----
> > Version: PGPfreeware 7.0.3 for non-commercial use
> > <http://www.pgp.com>
> >
> > iQA/AwUBPwzdn7rnDjSLw9ADEQIcCQCgkktDGf9u26bOntsqMPw93lpINdcAoM9h
> > tVqNcesMuM/L3fZaXmIdKdId
> > =fJlG
> > -----END PGP SIGNATURE-----
> >
> >
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
On Thu, 10 Jul 2003, Joe Harman wrote:
> Yeah, me too... LOL... Although, I don't understand the curly
> brackets... I don't see any examples using them in the manual either...
Actually, the manual is pretty clear on this, and with tons
of examples:
http://www.php.net/types.string
http://www.php.net/types.array
It's just a matter of where to look :)
Regards,
Philip
--- End Message ---
--- Begin Message ---
I want to know what is the difference between {} and the one without {}.:)
I use {} to resolve many problems, but I do now know what is the
difference:).
thank you!
"Aaron Axelsen" <[EMAIL PROTECTED]>
??????:[EMAIL PROTECTED]
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Try:
>
> $img_keywords = trim({$_POST["keywords"]});
>
> - ---
> Aaron Axelsen
> AIM: AAAK2
> Email: [EMAIL PROTECTED]
>
> Want reliable web hosting at affordable prices?
> www.modevia.com
>
> Web Dev/Design Community/Zine
> www.developercube.com
>
>
>
> - -----Original Message-----
> From: Micah Montoy [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, July 09, 2003 10:26 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] $_POST problem
>
>
> Anyone see what when I submit this, I can't do a $_POST on it? I
> check with the DB first to see if there is a value and if so, I fill
> it, otherwise, it will return a blank for the user to fill if they
> want.
>
> <input type="text" name="keywords" value="<?php
> echo("$new_keywords"); ?>" size="53" maxlength="500">
>
> On the page that it goes to when it is submitted, the post looks like
> this:
>
> $img_keywords = trim($_POST["keywords"]);
>
>
> thanks
>
>
>
> - --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
> -----BEGIN PGP SIGNATURE-----
> Version: PGPfreeware 7.0.3 for non-commercial use <http://www.pgp.com>
>
> iQA/AwUBPwzdn7rnDjSLw9ADEQIcCQCgkktDGf9u26bOntsqMPw93lpINdcAoM9h
> tVqNcesMuM/L3fZaXmIdKdId
> =fJlG
> -----END PGP SIGNATURE-----
>
>
--- End Message ---
--- Begin Message ---
Yes, I know that, what I mean is how to make or which is the PHP code so I
get the report like a Crystal Report for example
"David Robley" <[EMAIL PROTECTED]> escribió en el mensaje
news:[EMAIL PROTECTED]
> In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED]
> says...
> > I'm using MySQL and PHP for building a website, however now I need to
create
> > a report with something like this:
> >
> > -------------------------------------------------
> > {Title}
> > {Description}
> >
> > {Zone1}
> > Detail Zone1.Topic1
> > DetailZone1.Topic2
> > DetailZone1.Topic3
> >
> > {Zone2}
> > Detail Zone2.Topic1
> > DetailZone2.Topic2
> >
> > {Zone3}
> > Detail Zone3.Topic1
> > DetailZone3.Topic2
> > DetailZone3.Topic3
> > DetailZone3.Topic4
> > -------------------------------------------------
> >
> > I have 2 tables named Zone1 and Zone1detail where I do a join to get
values
> > I need. How ever don't know how to make something like this.
> >
> > Can anyone help? Thanks in advance
>
> Depends on how you have structured your tables. There should be a common
> field between the tables on which you can join.
>
> --
> Quod subigo farinam
>
> $email =~ s/oz$/au/o;
>
--- End Message ---
--- Begin Message ---
Okay this is a tuffy! I am really just looking for someone to point me
in the right direction, or tutorials or something! maybe ideas
1st - I have created a Lat and Long distance calculator... it takes 2
user inputed zip codes... accesses the MySQL DB for the Lat and Longs...
then figures out the distance between them...
Now there are 2 things I want to do here... take a map of the US...
PNG.. GIF... what ever... and associate the Lat/Long with coordinates on
the image... like a image map in HTML (sort of) - the first thing I want
to do is draw a line from point A to point B (on the map)... the second
is draw a circle for a search radius...
hmmm... it would also be cool if the image could be zoomed in on....
like... scaled down to 100 mile x 100 miles... and then show the 75 mile
radius circle....
okay, that's enough for now... hope someone can point me in the right
direction
Joe Harman
http://www.HarmanMedia.com
Health nuts are going to feel stupid someday, lying in hospitals dying
of nothing. - Redd Foxx
--- End Message ---
--- Begin Message ---
Hi, this is my first question to the list and ... Yes I'm a newbie,
verrry wet behind the ears.
I am trying to set up a secured site under IIS. I have done pretty well
by my standard to get to where I have. Authoursed users can access the
site, unauthorised ones get sent elsewhere. So, I am now up to testing
the various security combinations and its driving me mad that the
session persists when I'm testing bad logins.
How or where does one set up a "session extuinguisher"? After one two
or n attempts I want to kill the entire session and start afresh - note
this is in testig only, the way it works now is great for live.
Tia
Bruce
--- End Message ---
--- Begin Message ---
Hi!
I'd like to ask if there is any function for saving image into (windows)
BMP format (not wbmp - which is wireless BMP).
e.g. imagejpg() will save jpg file
Jan
--- End Message ---
--- Begin Message ---
Hi! Is there a way to use suexec with a non-cgi version of php? Or is there
any other way to do the same job as suexec would do?
--- End Message ---
--- Begin Message ---
Sure there is, the same way as in the cgi version. Safe mode must be off.
Fejes Jozsef wrote:
Hi! Is there a way to use suexec with a non-cgi version of php? Or is there
any other way to do the same job as suexec would do?
--- End Message ---
--- Begin Message ---
Hello!
I have a PHP class here that can fetch that information for you from the
XML sheet provided by the server. I'll send it to you if you want, I
forgot where I downloaded it (you could check www.hotscripts.com though).
//Simon
Ben Paul wrote:
Hello,
I am currently streaming via shoutcast once a week,
what i would like to do is basically talk to my shoutcast
server via the ip address and get the amount of listners
etc.
i know its possible, i was just wondering if any of you
had done this and could point me in the right direction
as i really havent a clue how this is done.
Thanks
Ben Paul
--- End Message ---
--- Begin Message ---
no.
i`m not trying to upload file on server.
i want to send e-mail with attachments but if it's possible without
using classes.
i thought that file should be first uploaded and then send with e-mail as
attachment, maybe uploading isn't correct...
i don't know how to do it.
szparag
--- End Message ---
--- Begin Message ---
hello,
i have got a problem with SQL select:
I have got a table such this:
id_k typ name id
1 f bla1 1
2 f bla2 1
2 i bla3 1
3 z bla4 1
3 f bla5 1
4 i bla6 1
4 z bla7 1
5 z bla8 1
and id = 1 and I need select these rows:
id_k typ nazev id
1 f bla1 1
2 f bla2 1
3 f bla5 1
4 i bla6 1
so, when doesn'i exist component (id_k = component) type "f" so I want
component with type "i", but when doesn't exist type "f" noir "i" I
don't want to select row with type "z".
jiri nemec, ICQ: 114651500
www.menea.cz - www stránky a aplikace
--- End Message ---
--- Begin Message ---
I did not understand you much but would not this work?
SELECT * FROM table WHERE typ='f' OR typ='i'
Jiří Němec wrote:
hello,
i have got a problem with SQL select:
I have got a table such this:
id_k typ name id
1 f bla1 1
2 f bla2 1
2 i bla3 1
3 z bla4 1
3 f bla5 1
4 i bla6 1
4 z bla7 1
5 z bla8 1
and id = 1 and I need select these rows:
id_k typ nazev id
1 f bla1 1
2 f bla2 1
3 f bla5 1
4 i bla6 1
so, when doesn'i exist component (id_k = component) type "f" so I want
component with type "i", but when doesn't exist type "f" noir "i" I
don't want to select row with type "z".
jiri nemec, ICQ: 114651500
www.menea.cz - www stránky a aplikace
--- End Message ---
--- Begin Message ---
hi,
JiøîÆèî eË wrote:
> hello,
>
> i have got a problem with SQL select:
>
> I have got a table such this:
>
> id_k typ name id
> 1 f bla1 1
> 2 f bla2 1
> 2 i bla3 1
> 3 z bla4 1
> 3 f bla5 1
> 4 i bla6 1
> 4 z bla7 1
> 5 z bla8 1
>
> and id = 1 and I need select these rows:
>
> id_k typ nazev id
> 1 f bla1 1
> 2 f bla2 1
> 3 f bla5 1
> 4 i bla6 1
>
> so, when doesn'i exist component (id_k = component) type "f" so I want
> component with type "i", but when doesn't exist type "f" noir "i" I
> don't want to select row with type "z".
>
> jiri nemec, ICQ: 114651500
> www.menea.cz - www stránky a aplikace
don't know, if i correctly understood, but how about this:
SELECT * FROM `YourTable`
WHERE `typ`="f" OR `typ`="i"
ODER BY `typ`;
--- End Message ---
--- Begin Message ---
Hello php-general,
some hacker just tries his luck everyday to get me pissed, is it
possible to make php files not downloadable? or coded? or something?
because some dude knows my passwords every time, and with them
passes the shity security to main user, thank god not root.
So is there any way?
if anyone knows any links or resources, please reply, i'll check
them, i need to put this to end
P.S system is freebsd.
Thank you!!!
there are even more and more kids that want to be named haker,
lookin at their age, could be even my son:)
--
Best regards,
Mantas mailto:[EMAIL PROTECTED]
--- End Message ---
--- Begin Message ---
Do you use secure connection? Well, you should.
Mantas Kriauciunas wrote:
Hello php-general,
some hacker just tries his luck everyday to get me pissed, is it
possible to make php files not downloadable? or coded? or something?
because some dude knows my passwords every time, and with them
passes the shity security to main user, thank god not root.
So is there any way?
if anyone knows any links or resources, please reply, i'll check
them, i need to put this to end
P.S system is freebsd.
Thank you!!!
there are even more and more kids that want to be named haker,
lookin at their age, could be even my son:)
--- End Message ---
--- Begin Message ---
Hello php-general,
my server is running freebsd 5.0
and yet i havent fixed bug that i knew long time ago, so can anyone
point me with some links or resources about it, i could not find any
good on google, maybe i don't know how to search.
The problem is
if the make script <? if($id) include($id); ?>
and then just write
test.php?id=/etc/passwd , they see all the file.
So how to make sure that no one can access other people files and
server files? and is there any way that nobody would be able to
download php files or how to make them look like code when they are
downloaded. Thanks!
P.S If someone knows good links please reply me! thanks a lot!
---Don't Get Mad, Ged Glad , Buy Gladware---
--
Best regards,
Mantas mailto:[EMAIL PROTECTED]
--- End Message ---
--- Begin Message ---
Mantas Kriauciunas wrote:
The problem is
if the make script <? if($id) include($id); ?>
and then just write
test.php?id=/etc/passwd , they see all the file.
Check if $id is valid. Exact way depends on the structure of the files.
Example 1: All included files are in web root and are named
something.html, something can contain letters, underscore, digits.
if($id && eregi('^[a-z0-9_]+\.html',$id)) include($id);
Example 2: The included files split into several directories, which can
contain letters, underscore, digits.
if($id && eregi('^[a-z0-9_]+/[a-z0-9_]+\.html',$id)) include($id);
Sure, this assumes you have nothing to hide in your *.html files.
So how to make sure that no one can access other people files and
server files? and is there any way that nobody would be able to
download php files or how to make them look like code when they are
downloaded. Thanks!
P.S If someone knows good links please reply me! thanks a lot!
---Don't Get Mad, Ged Glad , Buy Gladware---
--- End Message ---
--- Begin Message ---
Hi,
Thursday, July 10, 2003, 12:41:28 AM, you wrote:
DJ> Hi All,
DJ> I have the following function:
DJ> function encrypt ($x) {
DJ> $ini = parse_ini_file ($GLOBALS['INI_PATH']);
DJ> $td = mcrypt_module_open ('tripledes', '', 'ecb', '');
DJ> $iv = mcrypt_create_iv (mcrypt_enc_get_iv_size ($td),
DJ> MCRYPT_RIJNDAEL_256);
DJ> mcrypt_generic_init ($td, $ini["key"], $iv);
DJ> $encrypted_data = mcrypt_generic ($td, $x);
DJ> mcrypt_generic_deinit ($td);
DJ> mcrypt_module_close ($td);
DJ> return bin2hex($encrypted_data);
DJ> }
DJ> I get the following PHP Warning in my logs, however, the code executes ok:
DJ> [Wed Jul 9 10:25:49 2003] [error] PHP Warning: mcrypt_generic_init(): Iv
DJ> size incorrect; supplied length: 0, needed: 8 in
DJ> /usr/local/apache/htdocs-uat-retail/include/nocheck.iostream.class.php on
DJ> line 87
DJ> I have read into mcrypt, tried a couple things, but nothing will get rid of
DJ> that error. Could someone show me what I've done wrong?
DJ> -Dan Joseph
I use this to set iv to null so I don't need to worry about it :)
$iv = pack("a".mcrypt_enc_get_iv_size($td),$iv);
--
regards,
Tom
--- End Message ---
--- Begin Message ---
Hi everyone,
I would like to thank all the people that have answered my question and all the
others that didn't have the time to answer it. As I have seen, the opinions on
this point are quite different and the answer is not as evident as the technical
director affirmed to me.
Thank you.
Sergio
Giz a écrit :
> PHP is designed for rapid development of web applications. Manipulating
> relational database data is not its strong point. If I had a complicated
> database manipulation that could be done within and oracle stored procedure,
> and the database was large, or expected to get that way, I would strongly
> consider a stored proc, even if there was a simple alternative available via
> a short block of php, because the stored proc is going to be faster.
>
> This is no different than someone doing a select statement using a join,
> rather than selecting one table in php, iterating through the result set,
> and doing follow up select statements. In each case you would get the same
> data, but one method is intrinsically faster than the other.
>
> With that said... as the old saying goes "to the man with a hammer,
> everything looks like a nail." It may be that the interviewer simply knows
> oracle better than anything else, and looks to solve all problems with
> pl/sql, and oracle does provide the capability to do relatively complete web
> applications completely in pl/sql.
>
> For many people the abilities of pl/sql are irrelevant, because they are not
> using oracle as the backend.
>
> -----Original Message-----
> From: RIVES Sergio SOFRECOM [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, July 08, 2003 12:44 AM
> To: phplist
> Subject: [PHP] (pas d'objet)
>
> Hi everyone,
>
> I have a doubt, an existential question on the PHP... Yesterday I had an
> entrevue for a job and I was quite surprised by the technical director
> that told me that he prefers coding PL/SQL subroutines better than in
> PHP embedding. The Oracle database on which he works is about 100 Go.
> The application is on a web server. It is like a startup structure.
> I told him that I prefer doing all the things I can do with PHP better
> than in PL/SQL. He told me that all treatments couldn't be done in PHP
> because of the size of the database and memory limitation.
> I am writing you this mail to know your point of view on that point if
> you have time to answer me. What would be then the limit of the PHP
> coding ? For such a database what would be the right parametrization of
> the PHP.ini ? is there only a right parametrization for such database ?
> Does anyone have some information on that limitation of the PHP ? any
> article ?
>
> Thanks in advance for your answers and time.
>
> Sergio
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---