Both don't work... same problem... I cannot figure it out "Olivier Hubert" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hi, > > If you mysql connection is the only one you're trying to maintain, > I suggest you try > > $result = @mysql_query($sql) or die ("Couldn't execute > query."); > > e.g. without passing the $connection parameter. Also, try using mysql_error > to get the actual error message. > > HTH! > > Olivier > > At 16:30 2001-11-19 -0600, Todd Williamsen wrote: > >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]