Re[2]: [PHP] value passing from html form to php variable.
| From: | Stuart Dallas | Date: | Sat, 01 Jun 2002 16:08:11 +0000 |
| Subject: | Re[2]: [PHP] value passing from html form to php variable. | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-100235@lists.php.net to get a copy of this message | ||
On Saturday, June 1, 2002 at 5:00:18 PM, you wrote:
> Do you mind telling me where this php.ini is?
Create a php script containing just <?php phpinfo(); ?>. That page will tell
you where your php.ini is (or should be).
> 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_WHITESPACE, expecting T_STRING or
> T_VARIABLE or T_NUM_STRING in /local/scratch-1/ww220/Apache1.3/htdocs/test/add2.php on line 5
Try this...
$query = "INSERT INTO friends (id, firstname, surname) values
(nextval('friends_id_seq'), ".$_POST['firstname'].",
".$_POST['surname'].")";
--
Stuart