okay....my cookies and session varibles are not working on my handheld...but its working on my computer...i have checked my handheld using phpinfo(), it does accepts cookies...in desperate need to idea...kindly guide me please

invoice.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
if(ISSET($_GET['customerno']))
{
    $customerno =$_GET['customerno'];
    $_SESSION['customer_no']=$customerno;

    $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'");
}
?>

shipmentchecker.php

<?php
phpinfo();
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

if(ISSET($_GET['invoiceno']))
{
$invoiceno = $_GET['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
//This file is to check for the invoice number whether it exists or the field is empty
session_start();                                        //starting session
$host="localhost"; // Host name
$username=""; // Mysql username
$password=""; // Mysql password
$db_name="test"; // Database name
$tbl_name="test3"; // Table name

// Connect to server and select database.
$dhb1=mysql_connect("$host", "$username", "$password")or die("cannot connect");
mysql_select_db("$db_name")or die(mysql_error());

echo $_SESSION["invoice_no"];
$invoiceno=$_SESSION["invoice_no"];                     // assigning it to become a session variable(to be used in the future)

//sql commands to check for invoice no. in the database and the one entered in the form
$sql="SELECT * FROM $tbl_name WHERE invoice_no = '$invoiceno'";         //the sql query
$result = mysql_query($sql,$dhb1);                                          //runs the sql query    
$row = mysql_num_rows($result);                                         //returns the number of rows(0 is the particular invoice no. doesn't exist)
$row2 = mysql_fetch_array($result);

if($row>0)                                                              //invoice no. found, and link to the scan page
{
    //header("refresh:0;url=scandatainput.php" );   
}
else                                                                    //invoice no. not found, prompts user again
{
    echo "Invoice Number NOT FOUND";
    //header("refresh:1;url=invoice.php" );
}?>

i cannot use the variable from invoice.php in checker....can someone help me out...thank you

phpinfo() gives information about your server, not about the handheld. It is quite possible that your handheld does not support this.

You can pass the session id as a $_GET variable.
That will work even if cookies are not suported

its using windows ce...i'm not sure, but when i check the browser, it does accept cookies....
$_Get is to go get something from html forms right?...can i use to it to pas information around?

i'll take a look...thanks...willl update if i got anything

off the topic question, does using wifi affects our session or cookie, is it possible that my handheld doesn't support cookies?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.