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

From: Date: Sat, 01 Jun 2002 17:08:47 +0000
Subject: Re[6]: [PHP] value passing from html form to php variable.
References: 1 2 3 4 5 6 7  Groups: php.general 
Request: Send a blank email to php-general+get-100245@lists.php.net to get a copy of this message
On Saturday, June 1, 2002 at 6:00:22 PM, you wrote: > $query = "INSERT INTO friends (id, firstname, surname) values > (nextval('friends_id_seq'), ".$_POST['firstname'].", > ".$_POST['surname'].")"; It's so obvious you're gonna kick yourself (I did!). You need to enclose the two values in quotes, like so... $query = "INSERT INTO friends (id, firstname, surname) values (nextval('friends_id_seq'), '".$_POST['firstname']."', '".$_POST['surname']."')"; -- Stuart

« previous php.general (#100245) next »