[SOLVED] UPDATE not fully updating. please help.
Posted: Wed Sep 21, 2005 1:41 pm
Hello,
I am having a trouble with my update page.
It is going through the motions,
but it doesn't accept the data.
Here it is:
What I have checked:
- That all fields in the database that aren't going to be updated in this page are set to NULL
- That all the data input fields are named the same as in the definition above <input name="email">
- All the dynamic displays are working so they are reading the database and ID properly
Is there something that I have muffed?
I am having a trouble with my update page.
It is going through the motions,
but it doesn't accept the data.
Here it is:
Code: Select all
$link = mysql_connect("localhost", "username", "password")
or die("Could not connect: " . mysql_error());
mysql_select_db (database_db) or die("db not connected: " . mysql_error());
$ID = $_GET["ID"];
if($_POST["bpress"]=="update")
{
$sql = "UPDATE members SET
Mem_Name ='".$_POST["name"]."',
Mem_LName='".$_POST["lname"]."',
Mem_FName ='".$_POST["fname"]."',
Mem_Title='".$_POST["title"]."',
Mem_Bio='".$_POST["bio"]."',
Mem_CBio='".$_POST["cbio"]."',
Mem_CName='".$_POST["cname"]."',
Mem_URL='".$_POST["url"]."',
Mem_EMail='".$_POST["email"]."',
Mem_Password='".$_POST["password"]."',
Mem_Username='".$_POST["username"]."',
WHERE Mem_ID=".$ID;
if(!$result = mysql_query($sql))
{
echo mysql_error();
}
header("Location: http://www.devnet.net");
exit;
}What I have checked:
- That all fields in the database that aren't going to be updated in this page are set to NULL
- That all the data input fields are named the same as in the definition above <input name="email">
- All the dynamic displays are working so they are reading the database and ID properly
Is there something that I have muffed?