Struggling with code

From: Date: Thu, 05 Dec 2002 05:24:15 +0000
Subject: Struggling with code
Groups: php.general 
Request: Send a blank email to php-general+get-127098@lists.php.net to get a copy of this message
I am struggling with the code below. I keep getting the error "Couldn't execute query". Please help me out, let me know where I am going wrong. <? $db_name = "db1"; $table_name = "user"; $connection = @mysql_connect("localhost", "user", "password") or die("Couldn't connect."); $db = @mysql_select_db($db_name, $connection) or die("Couldn't select database."); $sql = "UPDATE $table_name SET name = \"$name\", lname = \"$lname\", mobil = \"$mobil\", email = \"$email\", url = \"$url\", WHERE id= \"$id\" "; $result = @mysql_query($sql,$connection) or die("Couldn't execute query."); ?> -------------------------------------------------------------------------- The content of this email message and any attachments are confidential and may be legally privileged, intended solely for the addressee. If you are not the intended recipient, be advised that any use, dissemination, distribution, or copying of this e-mail is strictly prohibited. If you receive this message in error, please notify the sender immediately by reply email and destroy the message and its attachments.

« previous php.general (#127098) next »