INSERT Problem

From: Date: Wed, 09 May 2001 16:29:57 +0000
Subject: INSERT Problem
Groups: php.db 
Request: Send a blank email to php-db+get-9196@lists.php.net to get a copy of this message
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

« previous php.db (#9196) next »