hello, I have a strange problem - unable to insert data in to postgresql table, the script inserts only empty rows. (if i change variables $firstname and $surname to strings, the script works.) Maybe the problem in configuration of PHP?
<? echo "<form action=\"pgsqltest01.php\" method=\"get\">"; echo "First Name : <input type=\"text\" name=\"firstname\" value=\"FirstName\">"; echo "<BR> Surname : <input type=\"text\" name=\"surname\" value=\"Surname\">"; echo "<BR><input type=\"submit\" name=\"su\" value=\"Submit\">"; echo " <input type=\"reset\" name=\"reset\" value=\"Clear It\"></form>"; $db = pg_connect("dbname=friends user=postgres"); if ($su!='') { $query4 = "INSERT INTO friends (id, firstname, surname) values (nextval('friends_id_seq'), '$firstname', '$surname')"; $result = pg_exec($db, $query4); } pg_close(); ?> __________________________________________________ Do You Yahoo!? LAUNCH - Your Yahoo! Music Experience http://launch.yahoo.com -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php