Greetings --
PHP + MySQL + sessions?

I'm trying use the script( and html page) to below to set session 
variables, but
keep getting the follow errors:
NOTE: I seen several posting re: using $HTTP_SESSION_VAR is another case 
that would apply?

Thanks in advance,
David Jackson

---------------- Browser Error Messages ---------------------
Warning: Cannot send session cookie - headers already sent by (output 
started at
/home/sites/site13/web/connect.php:13) in
/home/sites/site13/web/frontdesk/sales/login.php on line 15

Warning: Cannot send session cache limiter - headers already sent (output 
started at
/home/sites/site13/web/connect.php:13) in
/home/sites/site13/web/frontdesk/sales/login.php on line 15.

------------------- login.php ---------------------------------

<?php include("/home/sites/"); ?>
$result = mysql_query("SELECT uid,uname,uperms FROM guestusers
                WHERE uname = '$uname' 
                   AND upass = PASSWORD('$upass')"); 

if (mysql_num_rows($result)!=1) {
        echo "Dis ain't good !!\n";

mysql_free_result ($result);

} else {
// start session

// parse out query output and resign to session vars
list($uid,$uname,$uperms) = mysql_fetch_row($result);
$Uid = $uid;
$Uname = $uname;
$Uperms = $uperms;

// redirect to main menu page
mysql_free_result ($result);

----------------- login.html ------------------------
<title>Generic Time Tracker</title>
<h3>Sales Entry Login screen:</h3>
<table border="0" cellspacing="5" cellpadding="5">
<form action="login.php" method="post">
<td><input type="Text" name="uname" size="15"></td>
<td><input type="password" name="upass" size="15"></td>
<td colspan="2" align="CENTER"><input type="Submit" name="submit" 


PHP General Mailing List (
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