php code
<html>
<head>
<title>Update Personal Data</title>
</head>
<body bgcolor="white" text="black" link="blue" vlink="purple" alink="red">
<div align="center">
<table border="3" width="730" >
<tr>
<td width="730"><p align="center">
<img src="../logo.gif" border="0"></p>
<p align="center"><font face="Arial" size="7"><b>UPDATE PERSONAL DATA </b></font></td>
</tr>
<tr>
<td width="100%" bgcolor="white">
<?php
include "/home/misite/public_html/flatland/cgi-bin/whoami.php";
include "/home/misite/public_html/cgi-bin/set_var.php";
?>
<table>
<tr>
<form method="post" action="test.php">
<input type=hidden name="id" value="<?php echo $id ?>">
<td>
Your Name:</td><td><input SIZE="60" type="Text" name="yourname" value="<?php echo $yourname ?>"><br>
</td></tr><tr><td>
Your Address:</td><td><input size="60" type="Text" name="youraddress" value="<?php echo $youraddress ?>"><br>
</td></tr><tr><td>
Your City:</td><td><input size="60" type="Text" name="yourcity" value="<?php echo $yourcity ?>"><br>
</td></tr><tr><td>
Your Postal Code:</td><td><input size="60" type="Text" name="yourpcode" value="<?php echo $yourpcode ?>"><br>
</td></tr><tr><td>
Your Tel Code & Number:</td><td><input size="60" type="Text" name="yourtel" value="<?php echo $yourtel ?>"><br>
</td></tr><tr><td>
Your E-Mail Address:</td><td><input size="60" type="Text" name="youremail" value="<?php echo $youremail ?>"><br>
</td></tr><tr><td>
Your Contact Persons Name:</td><td><input size="60" type="Text" name="yourcontact" value="<?php echo $yourcontact ?>"><br>
</td></tr><tr><td>
Your Bank Name:</td><td><input size="60" type="Text" name="yourbank" value="<?php echo $yourbank ?>"><br>
</td></tr><tr><td>
Your Branch Name:</td><td><input size="60" type="Text" name="yourbranch" value="<?php echo $yourbranch ?>"><br>
</td></tr><tr><td>
Your Branch Code:</td><td><input size="60" type="Text" name="yourbranchcode" value="<?php echo $yourbranchcode ?>"><br>
</td></tr><tr><td>
Your Account Number:</td><td><input size="60" type="Text" name="youraccount" value="<?php echo $youraccount ?>"><br>
</td></tr><tr><td>
Your Business Name:</td><td><input size="60" type="Text" name="farmname" value="<?php echo $farmname ?>"><br>
</td></tr><tr><td>
Your Hunter Type:</td><td><input size="60" type="Text" name="hunttype" value="<?php echo $hunttype ?>"><br>
</td></tr><tr><td>
Your Web Sub Title:</td><td><input size="60" type="Text" name="subtitle" value="<?php echo $subtitle ?>"><br>
</td></tr><tr><td>
Your Web Theme:</td><td><input size="2" type="Text" name="theme" value="<?php echo $theme ?>"><br>
</td></tr><tr><td>
<input type="Submit" name="personel" value="Enter information">
</td>
</tr>
</table>
</form>
<?php
if ($personel) {
// here if no ID then adding else we're editing
$sql = "UPDATE admin SET yourname='$yourname', youraddress='$youraddress', yourcity='$yourcity', yourpcode='$yourpcode', yourtel='$yourtel', youremail='$youremail', yourcontact='$yourcontact', yourbank='$yourbank', yourbranch='$ourbranch', yourbranchcode='$yourbranchcode', youraccount='$youraccount', farmname='$farmname', hunttype='$hunttype', subtitle='$subtitle', theme='$theme' WHERE ID='$id'";
// run SQL against the DB
$result = mysql_query($sql);
echo "Record updated/edited!<p>";
}
?>
</td>
</tr>
</table>
</div>
</body>
</html>
It show that record updated but does not update record!
What am I doing wrong?