okay...seem to be experiencing some problem here....in my pc, the web application is running perfectly....but when i run it from my handheld, its showing error...
this is my code
<?php
session_start(); //starting session
$host="localhost"; // Host name
$username=""; // Mysql username
$password=""; // Mysql password
$db_name="test"; // Database name
$tbl_name="test3"; // Table name
$customerno=$_POST['customerno'];
$_SESSION['customer_no']=$customerno; <--------error is here
$dbh1=mysql_connect("$host", "$username", "$password")or die("cannot connect");
mysql_select_db("$db_name")or die(mysql_error());
$result = mysql_query("SELECT DISTINCT invoice_no FROM $tbl_name where customer_no='$customerno' and status='Unscanned'");
?>
<title>Shipping Verification System</title>
<link rel="stylesheet" href="web.css" type="text/css" media="handheld" />
<FORM method="post" name="form">
<h1>Enter your Invoice Number</h1> <!--Creating a form with actions-->
<table>
<tr>
<td>Invoice No. :</td>
<td>
<select name="invoiceno">
<?php
//for each row we get from mysql, echo a form input
while ($row = mysql_fetch_array($result)) {
echo "<option>$row[invoice_no]</option>\n";
}
?>
</select></td>
</tr>
</table>
<input type="submit" name="submit" value="Back" onclick="form.action='customercode.php';"></input>
<input type="submit" name="submit" value="Submit" onclick="form.action='shipmentchecker.php';"></input>
</FORM>
shipmentchecker.php
<?php
session_start(); //starting session
$host="localhost"; // Host name
$username=""; // Mysql username
$password=""; // Mysql password
$db_name="test"; // Database name
$tbl_name="test3"; // Table name
$tbl_name1="scan"; // Table name
$invoiceno=$_POST['invoiceno'];
$_SESSION['invoice_no']=$invoiceno;
$dbh1=mysql_connect("$host", "$username", "$password")or die("cannot connect");
mysql_select_db("$db_name")or die(mysql_error());
$sql="SELECT * FROM $tbl_name WHERE invoice_no = '$invoiceno'" ; //the sql query
$result = mysql_query($sql) or die(mysql_error());
$row = mysql_fetch_array($result);
$sql1="SELECT * FROM $tbl_name1 WHERE invoice_no = '$invoiceno'" ; //the sql query
$result1 = mysql_query($sql1) or die(mysql_error());
$row1 = mysql_num_rows($result1);
if($row1>0)
{
echo "Shipment exists";
header("refresh:1;url=checker.php" );
}
else
{
echo "New shipment found";
header("refresh:1;url=display.php" );
}
?>
checker.php
<?php
session_start(); //starting session
$host="localhost"; // Host name
$username=""; // Mysql username
$password=""; // Mysql password
$db_name="test"; // Database name
$tbl_name="test3"; // Table name
$tbl_name2="scan";
$db_name1="test1"; // Database name
$tbl_name1="test2"; // Table name
// Connect to server and select database.
$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());
$invoiceno=$_SESSION['invoice_no']; // session invoice no. <---------error is here
okay....i have already marked the error spot....now, the first time i run there is no problem, after entering the invoice_no i'm geting a promp saying, undefine index invoice_no and the same error for customer_no...(i'm using wifi to communicate to the server )