Re: [PHP] value passing from html form to php variable.

2002-06-01 Thread Philip Olson
> $query = "INSERT INTO friends (id, firstname, surname) values >(nextval('friends_id_seq'), > $_POST['firstname'], $_POST['surname'])"; > > which returns error: > Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING >or > T_VARIABLE or T_NUM_STRING in > /local/s

Re: [PHP] value passing from html form to php variable.

2002-06-01 Thread Philip Olson
Some thoughts: a) Why is $firstname empty? It's empty because the PHP directive register_globals = off. So, PHP will not create $firstname automatically. This is most likely the cause. b) How do I access $firstname with register_globals = off then? Many ways. Regardless of re

Re: [PHP] value passing from html form to php variable.

2002-06-01 Thread Wei Wang
Do you mind telling me where this php.ini is? And I tried the second attempt like this: $query = "INSERT INTO friends (id, firstname, surname) values (nextval('friends_id_seq'), $_POST['firstname'], $_POST['surname'])"; which returns error: Parse error: parse error, unexpected T_ENCAPSED_AND_

Re: [PHP] value passing from html form to php variable.

2002-06-01 Thread Stuart Dallas
On Saturday, June 1, 2002 at 4:51:20 PM, you wrote: > I got a simple form addform.html and add.php look like the following. > But everytime I got empty value from firstname and lastname. It seems like > the input value in the html page was not passed on to the php variable > $firstname in add.php.