The function of delete record is working, but you need to double click the Delete Button to successfuly delete the record...can anyone help me pls
<?php
$con = mysql_connect("localhost","root","");
$sql = mysql_select_db("luweegee",$con);
$sel = mysql_query("SELECT * FROM resume");
?>
<html>
<body>
<table border=1 align='center' width=800 cellpadding=20 cellspacing=0>
<tr>
<td colspan=2><h1>Delete Record</h1>
</td>
</tr>
<tr>
<td>
<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>
</td>
<td>
<table border=2 width=550 cellpadding=7 cellspacing=0>
<?php
for($x=0;$x<=100;$x++)
{
if($_POST[del.$x])
{
$delete = mysql_query("DELETE FROM resume WHERE id=$x");
echo "record has been deleted";
}
}
echo "<table border=0 align='center' width=>
<form method='post' action='View.php'>
<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>";
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><input type='submit' value='Remove' name='del$data[id]'></td>
</tr>";
}
echo "</table>";
?>
<tr>
<td colspan=2 align='center'>
Copyright©2011,
</tr>
</td>
</table>
</body>
</html>