I don't know how many different ways I have tried this query... This is taking data from a form to update information in the database... It says its updated, but when you look at the table to see if its there, NADA.. nothing, zippo....here is the code:
<?
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", "pass") or die ("Couldn't connect.");
$db = @mysql_select_db($db_name, $connection) or die("Couldn't select database.");
$sql = " UPDATE tblmembers
SET
FirstName = \"$FirstName\",
Initial = \"$Initial\",
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 = @ ($sql , $connection) or die ("Couldn't execute query.");
?>
<HEAD>
<TITLE>Feminine Forum Contact Management System: Contact Updated</TITLE>
</HEAD>
<BODY>
<h1>Feminine Forum Contact Management System</h1>
<h2><em>Modify a Contact - Contact Updated</em></h2>
<P>The following information was successfully updated in <? echo "$table_name"; ?></p>
<table cellspacing=3 cellpadding=5>
<tr>
<th>NAME & ADDRESS INFORMATION</th>
<th>OTHER CONTACT/PERSONAL INFORMATION</th>
</tr>
<tr>
<td valign=top>
<P><STRONG>First Name:</STRONG><BR>
<? echo "$FirstName"; ?></P>
<P><STRONG>Initial:</STRONG><BR>
<? echo "$Initial"; ?></P>
<P><STRONG>Last Name:</STRONG><BR>
<? echo "$LastName"; ?></P>
<P><STRONG>Address Line 1:</STRONG><BR>
<? echo "$Address1"; ?></P>
<P><STRONG>Address Line 2:</STRONG><BR>
<? echo "$Address2"; ?></P>
<P><STRONG>City:</STRONG><BR>
<? echo "$City"; ?></P>
<P><STRONG>State:</STRONG><BR>
<? echo "$State"; ?></P>
<P><STRONG>Zip:</STRONG><BR>
<? echo "$Zip"; ?></P>
</td>
<td valign=top>
<P><STRONG>Home Telephone Number:</STRONG><BR>
<? echo "$HomePhone"; ?></P>
<P><STRONG>Work Telephone Number:</STRONG><BR>
<? echo "$WorkPhone"; ?></P>
<P><STRONG>Fax:</STRONG><BR>
<? echo "$Fax"; ?></P>
<P><STRONG>E-mail Address:</STRONG><BR>
<? echo "$Email"; ?></P>
<P><STRONG>UserId:</STRONG><BR>
<? echo "$UserId"; ?></P>
<P><STRONG>Password:</STRONG><BR>
<? echo "$Password"; ?></P>
</td>
</tr>
<tr>
<td align=center colspan=2><br>
<p><a href="contact_menu.php">Return to Main Menu</a></p>
</TD>
</TR>
</TABLE>
</BODY>