A
Anonymous
Guest
I am placing this at the top of the page where I would like to assign and use my $_SESSION variable:
But my database queries are coming out screwy, probably because the script doesn't recognize "$_SESSION['username'] = $username"....
And I get these PHP errors:
for these two lines respectively:
What is the issue here?...thanks.
__________________
R.J.
http://www.mediamogulsweb.com
Code:
// start the session
session_start();
header("Cache-control: private"); //IE 6 Fix
$username = $_POST['username'];
// Register session key with the value
$_SESSION['username'] = $username;
But my database queries are coming out screwy, probably because the script doesn't recognize "$_SESSION['username'] = $username"....
And I get these PHP errors:
Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /home/httpd/vhosts/mediamogulsweb.com/httpdocs/shopping_cart.php:7) in /home/httpd/vhosts/mediamogulsweb.com/httpdocs/shopping_cart.php on line 18
Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/httpd/vhosts/mediamogulsweb.com/httpdocs/shopping_cart.php:7) in /home/httpd/vhosts/mediamogulsweb.com/httpdocs/shopping_cart.php on line 18
Warning: Cannot modify header information - headers already sent by (output started at /home/httpd/vhosts/mediamogulsweb.com/httpdocs/shopping_cart.php:7) in /home/httpd/vhosts/mediamogulsweb.com/httpdocs/shopping_cart.php on line 19
for these two lines respectively:
Code:
session_start();
header("Cache-control: private"); //IE 6 Fix
What is the issue here?...thanks.
__________________
R.J.
http://www.mediamogulsweb.com