Where do the variables, $first_name and $last_name come from? QueryString or Form submittal? Do you have register_globals=on or have you taken the fact that they are not registered into account?
> -----Original Message----- > From: cin [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, May 21, 2002 11:01 AM > To: [EMAIL PROTECTED] > Subject: [PHP-DB] adding troubles revisited > > > hi everyone. please bear with me as i am trying to troubleshoot this > problem to the best of my abilities ... > > as it stands, i can create both databases and tables remotely > using php > scripts *read as i can do it from a web browser client*. > connecting to the > database and displaying output is also troublefree. however, > whenever i try > to add data to the tables, i either get blank entries or > absolutely nothing. > > the following script ... > > <html> > <body> > <? php > mysql_connect("localhost", "test", "testpw"); > mysql_select_db("testdb"); > mysql_query("insert into firsttab (first_name, last_name) values > ('$first_name', '$last_name')"); > print ($first_name); > print (" "); > print ($last_name); > print ("<p>"); > print ("blah blah blah"); > ?> > </body> > </html> > > with the appropriate mysql_error() statement gave the > following error msg: > > string(35) "insert into firsttab values(","); > > any help is greatly appreciated at this point. > > > > cin > > > > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php