try using single quotes Jim ----- Original Message ----- From: "Todd Williamsen" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, November 19, 2001 2:30 PM Subject: [PHP-WIN] new problem... problem with Query...
> Here it is.... I get the error "cannot execute query" so there is > something wrong with the SQL and I cannot figure it out... > > <? > > if ((!$FirstName) || (!$LastName)) { > header("Location: http://www.feminineforum.com/admin/pick_modcontact.php"); > exit; > > } else { > > session_start(); > > } > > if ($valid != "yes") { > header("Location: http://www.feminineforum.com/admin/contact_menu.php"); > exit; > > } else { > > session_register('valid'); > > } > > > $db_name = "feminineforum"; > $table_name = "tblmembers"; > > $connection = @mysql_connect ("localhost", "feminine", "krmc33") or die > ("Couldn't connect."); > > $db = @mysql_select_db ($db_name, $connection) or die("Couldn't select > database."); > > $sql = "UPDATE $table_name > SET > FirstName = \"$FirstName\", > LastName = \"$LastName\", > Address1 = \"$Address1\", > Address2 = \"$Address2\", > City = \"$City\", > State = \"$State\", > Zip = \"$Zip\", > HomePhone = \"$HomePhone\", > WorkPhone = \"$WorkPhone\", > Fax = \"$Fax\", > Email = \"$Email\", > UserId = \"$UserId\", > Password = \"$Password\", > WHERE id = \"$ID\" > "; > > $result = @mysql_query($sql, $connection) or die ("Couldn't execute > query."); > > > > -- > PHP Windows 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] > > -- PHP Windows 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]