heyy guys...really could use some help here...
my table is not updating its value, but there are no errors...the syntax seem to be correct
<?php
session_start();
$host="localhost"; // Host name
$username=""; // Mysql username
$password=""; // Mysql password
$db_name="test"; // Database name
$tbl_name="testing3"; // Table name
$invoice_no=$_SESSION['invoice_no'];
$container_no=$_SESSION['container_no'];
// Connect to server and select database.
mysql_connect("$host", "$username", "$password")or die("cannot connect");
mysql_select_db("$db_name")or die(mysql_error());
$sql1="SELECT * FROM $tbl_name WHERE invoice_no = '$invoice_no' and container_no = '$container_no'";
$result1 = mysql_query($sql1);
$row1 = mysql_num_rows($result1);
$row2 = mysql_fetch_array($result1);
$part_no=$_SESSION['part_no'];
$spart_no=$_SESSION['spart_no'];
$no_pallets=$_SESSION['no_pallets'];
$pnum=$_POST['pnum'];
$sernum=$_POST['sernum'];
$sprtnum=$_POST['sprtnum'];
$invoice_no1=$row2['invoice_no'];
$container_no1=$row2['container_no'];
$prt_no=$row2['prt_no'];
$ser_no=$row2['ser_no'];
$sprt_no=$row2['sprt_no'];
$pallet_no=$row2['pallet_no'];
echo "$invoice_no"."<br>";
echo "$container_no"."<br>";
echo "$invoice_no1"."<br>";
echo "$container_no1"."<br>";
echo "$prt_no"."<br>";
echo "$ser_no"."<br>";
echo "$sprt_no"."<br>";
echo "$pallet_no"."<br>";
if($row1>0)
{
if($invoice_no1==$invoice_no && $container_no1==$container_no && $part_no==$pnum && $ser_no==$sernum && $sprt_no==$sprtnum){
$sql2="UPDATE $tbl_name SET 'status'='Completed' WHERE 1";
$result2=mysql_query($sql2);
echo "Shipment Verified";
}
else
{
echo "Wrong input, please try again";
}
}
else
{
echo "Error, shipment not found....Please relog";
//header("refresh:1;url=main_login.php");
}
?>