0

okay....i can't delete the row...
the screen is juz blank...been trying to figure this out....

$invoice_no=$_SESSION['invoice_no'];
	$dbh1=mysql_connect("$host", "$username", "$password")or die("cannot connect");
	$dbh2=mysql_connect("$host", "$username", "$password",true)or die("cannot connect");
	mysql_select_db("$db_name",$dbh1)or die(mysql_error());
	mysql_select_db("$db_name1",$dbh2)or die(mysql_error());
	$sql="SELECT * FROM $tbl_name WHERE invoice_no = '$invoice_no'";			//the sql query
    $result = mysql_query($sql,$dbh1);
	$row = mysql_fetch_array($result);
	$container_no=$row['container_no'];
	$document_no=$row['document_no'];
	$part_no=$row['part_no'];
	$spart_no=$row['spart_no'];
	$no_pallets=$row['no_of_pallets'];
	$status='Inactive';

	$sql1="INSERT INTO $tbl_name1 (invoice_no,container_no,document_no,part_no,spart_no,no_of_pallets,status)VALUES('".$invoice_no."','".$container_no."','".$document_no."','".$part_no."','".$spart_no."','".$no_pallets."','".$status."')";		//sql query defined
    $result=mysql_query($sql1,$dbh2);
    $containernumber=$_POST['containernumber'];
	$sql2="DELETE $tbl_name WHERE invoice_no='".$invoice_no."'";
	$result2=mysql_query($sql2,$dbh1);
	echo "Container Number changed";
1
Contributor
1
Reply
2
Views
5 Years
Discussion Span
Last Post by gopi17
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.