while i click submit button it updated the same id of one table and delete the same id of another table field. How it will perform kindly provide me the solutions.
if($_POST['submit']=='update'){
$detail=mysql_real_escape_string($_POST['detail']);
$status='open';
$sid=$_POST['sid'];
$sql=mysql_query("UPDATE project_sheeting_production_dispatch SET status='$status' where sid=$sid") or die("Insertion Failed:" . mysql_error());
$sql1=mysql_query("DELETE project_sheeting_production_delivered where sid=$sid") or die("Insertion Failed:" . mysql_error());