This is driving me nuts. I can't insert anything into a mysql database
using PHP. I can insert from the command line when logged in with Telnet.
Using PHP I can connect and retrieve data from the database, just can't
INSERT anything.
This is what doesn't work:
$sql = "INSERT INTO $table_name (First_Name, Last_Name)
VALUES (\"Jeff\", \"Oien\")";
$result = mysql_query($sql,$connection) or die("Failed");
or
$sql = "INSERT INTO $table_name (First_Name, Last_Name)
VALUES (\"$First_Name\", \"$Last_Name\")";
$result = mysql_query($sql,$connection) or die("Failed");
yet this will work from the command line:
INSERT INTO TheTable (First_Name, Last_Name)
VALUES ("Jeff", "Oien");
Am I missing something? Thanks for any help.
Jeff Oien
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]