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.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to