Hi everyone,

I'm not sure what I have done wrong here.  I haven't been sucessful in
finding anything that points to what the cuase could be.

What I find interesting is that I have used session in another area of the
web site with out problems.  The only difference between it and the way I
have done it here is that I'm using the header function in this bit of code,
where as the session is started and variables registered and the processing
is done on another page.

Anyway here is the code for the log in page:



function checkdetails($db, $HTTPVARS) {
    //check if allowed access
    $user = $HTTPVARS['uid'];
    $passwd = $HTTPVARS['passwd'];

    $sql = "select * from tbl_maxware where loginID = '$user' and password =
    $result = $db->query($sql);
    checkError($result, $db, "Error in checkDetails");

    if ($result->numrows() == 0) {
        echo "<html><body>";
        echo "<h2>Error Loging In</h2>";
        echo "<br>Not a valid login try again or contact the admin<br>";
        echo "<a href=\"./login.php\">Try Again</a>";
        echo "</body></html>";
    } else {
        // matched in the maxware table
        $UID = $success[0];
        $logUID = $success[1];
        $logName = $success[2];
        //echo session_save_path();
        session_register("UID", "logUID", "logName");
        // send them to the main page
        header("Location: ./supportau.php");

} // end checkdetails

if (array_key_exists( "uid", $HTTP_POST_VARS ) ) {
    checkdetails($db, $HTTP_POST_VARS);
} else {

Code for the following "main page"

include( './connectDB.php' );
        @import url(./max.css);
        @import url(./supportAU.css);
        @import url(./link.css);
<h2>Support Database</h2>
<table width="90%" border="1">
<tr><td rowspan="2" width="30%">
<!--<table width="100%" border="1" bgcolor="#887766">
<tr><td> -->
echo "Name= $logName";


This returns an error:

 PHP Warning: Undefined variable: logName in
c:\inetpub\wwwroot\supportau\supportau.php on line 25



PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to