Hi all, i have written delete operation.......but its not deleting...........here is the code.......can u explain me whats wrong
<?
session_start();
include('database.php');
$mailid1 = $_GET['mail_id'];
session_register("mailid1");
$query1="SELECT * FROM autoalto_mail where mail_id='".$mailid1."'";
$result = mysql_query( $query1 );
while($row = mysql_fetch_array($result))
{
echo $row['subject'];
}
mysql_close();
?>
</b></td>
<td align="right" colspan="3" style="padding-left:5px;" class="headtitle">
<a href="Contractor_reply.php"><b>Reply</b></a><span >/</span>
<a href="contractor_mail_delete_action.php"><b>Delete</b></a><span>/</span>
<a href="lll.html"><b>Next</b></a></td></tr>
<tr><td><b><font size="2"><span style="color:005D95">From:</span></b>
<?
session_start();
include('database.php');
$mailid1 = $_GET['mail_id'];
$query1="SELECT * FROM autoalto_mail where mail_id='".$mailid1."'";
$result = mysql_query( $query1 );
while($row = mysql_fetch_array($result))
{
echo $row['From_user'];
}
mysql_close();
?>
</b></td></tr>
</table>
</td></tr>
<tr><td>
<?
session_start();
include('database.php');
$mailid1 = $_GET['mail_id'];
$query1="SELECT * FROM autoalto_mail where mail_id='".$mailid1."'";
$result = mysql_query( $query1 );
//echo mysql_num_rows($result) ;
while($row = mysql_fetch_array($result))
{
echo $row['contents'];
}
mysql_close();
?>
<?
session_start();
include('database.php');
$mailid1 = $_GET['mail_id'];
$query1="DELETE FROM autoalto_mail where mail_id='".$mailid1."'";
$result = mysql_query( $query1 );
//echo mysql_num_rows($result) ;
mysql_close();
?>