Can u help me guys im a newbie in php...i want u 2 check my Update code because they not function. is there something wrong in my code?
<?php
$con = mysql_connect("localhost","root","");
$sql = mysql_select_db("luweegee",$con);
?>
<html>
<body>
<table border=1 align='center' width=800 cellpadding=20 cellspacing=0>
<tr><td colspan=2><h1>Edit Record</h1></td></tr>
<tr>
<td valign='top'>
<ul>
<a href='View.php'><li>View Record</li></a>
<a href='Add.php'><li>Add Record</li></a>
<a href='Edit.php'><li>Edit Record</li></a>
<a href='Delete.php'><li>Delete Record</li></a>
</u>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
</td>
<td valign='top'>
<table border=1 width=550 cellpadding=3 cellspacing=0>
<?php
echo"
<tr>
<td><center>Name</center></td>
<td><center>Age</center></td>
<td><center>Sex</center></td>
<td><center>Mobile</center></td>
<td><center>Action</center></td>
</tr>
<form method='post' action='Edit.php'>";
$sel = mysql_query("SELECT * FROM resume");
while($data=mysql_fetch_array($sel))
{
echo "<tr>
<td><center>$data[name]</center></td>
<td><center>$data[age]</center></td>
<td><center>$data[sex]</center></td>
<td><center>$data[mobile]</center></td>
<td><center><input type='submit' value='Update' name='updateButt$data[id]'></center></td>
</tr>";
}
echo "</form>";
for($x=0;$x<=100;$x++)
{
if($_POST[updateButt.$x])
{
$select = mysql_query("SELECT * FROM resume WHERE id=$x");
while($data=mysql_fetch_array($select))
{
echo "<form name='myform' method='post' action='Edit.php'>
<table border=1 align='center' cellspacing=0>
<tr><td colspan=2>Editing: <span class='underline'>$data[name]</span></td></tr>
<tr><td>Name: </td><td><input type='text' size=20 name='name'/></td></tr>
<tr><td>Age: </td><td><input type='text' size=20 name='age'/></td></tr>
<tr><td>Sex: </td><td><input type='text' size=20 name='sex'/></td></tr>
<tr><td>Mobile: </td><td><input type='text' size=20 name='mobile'/></td></tr>
<tr><td colspan=2><input type='submit' value='Submit' name='submitEditForm'/></td></tr>
</form>";
}
}
}
if($_POST['submitEditForm'])
{
$update = mysql_query("UPDATE 'resume' SET name=$_POST[name], age=$_POST[age], sex=$_POST[sex], mobile=$_POST[mobile] WHERE id=$_POST[id]");
echo "Record successfully updated.";
}
?>
</table>
<tr>
<td colspan=2 align='center'>
Copyright©2011,
</tr>
</td>
</table>
</body>
</html>