i have a two table table: name as a table1 and table2 which is from the record table1 i transferred it to a table2 which is i use insert to transfer and now after transferring record to another or into a table2 i want to delete the record i transferred to a table2 in 1 click. basically it is insert/transfer first before delete.
here the code below, that delete function is not work.
Code: Select all
if(isset($_POST['received_submit']))
{
$pingsql = ("INSERT INTO tbl_recieve(id,uid,cat_name,product_name,product_model,rec_on,return_on,sold,balancs,re_qty,dt_nwo,dt_response,commnt,dt_recve)
VALUES('$xvalid','$xvaluid','$xvalcat_name','$xvalproduct_name','$xvalproduct_mode','$xvalrec_on','$xvalreturn_on','$xvalsold','$xvalbalancs','$xvalre_qty','$xvaldt_nwo','$xvaldt_response','$xvalcommnt','$xvaldt_recve')");
$pingresult = mysql_query($pingsql);
if($pingresult)
{
header('Location:processdone.php');
}
else
{
header('Location:octagon-portal-geterror2979002921113.php');
}
}
else
{
header('Location:octagon-portal-geterror2979002921183.php');
}processdone.php
Code: Select all
if(isset($_POST['id']))
{
$xvalid = $_GET['id'];
$pingsql = ("DELETE FROM tbl_adm_rpl WHERE id = '$xvalid'");
$pingresult = mysql_query($pingsql);
if($pingresult)
{
header('Location:YES.php');
}
else
{
header('Location:NO.php');
}
}
else
{
header('Location:NOOOO.php');
}