take the closing php tag from the end of the first line plus the openning
tag from the begining of the second line.  that is sending a line feed to
the browser.
Jim
----- Original Message -----
From: "David Jackson" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, December 26, 2001 5:54 PM
Subject: [PHP] Warning: Cannot send session cookie


> 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
> where
> 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/www.pickledbeans.com/web/connect.php"); ?>
> <?php
> $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);
> mysql_close($link);
>
> } else {
> // start session
> session_start();
> session_register("Uid");
> session_register("Uname");
> session_register("Uperms");
>
> // 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);
> mysql_close($link);
>
>
>
> ----------------- login.html ------------------------
> <html>
> <head>
> <title>Generic Time Tracker</title>
> </head>
> <h3>Sales Entry Login screen:</h3>
> <table border="0" cellspacing="5" cellpadding="5">
> <form action="login.php" method="post">
> <tr>
> <td>Username:</td>
> <td><input type="Text" name="uname" size="15"></td>
> </tr>
> <tr>
> <td>Password</td>
> <td><input type="password" name="upass" size="15"></td>
> </tr>
> <tr>
> <td colspan="2" align="CENTER"><input type="Submit" name="submit"
> value="Enter"></td>
> </tr>
> </form>
> </table>
> </body>
> </html>
>
> --
>
>
>
> --
> 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]
>
>


-- 
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