I recently downgraded (or upgraded depending on how you look at it) a server from a 50$ a month to a cheap hosting plan (50$ per year) to save money. Anyhow I basically copied and pasted the site over and I seem to have a problem with my session usage which I use in the join section. You don't need to say anything about people being able to read my form data, I could care less.. Anyhow when i first start the session I'm presented with this.. Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /home/oregonvd/public_html/html/buy.php:6) in /home/oregonvd/public_html/html/buy.php on line 45 Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/oregonvd/public_html/html/buy.php:6) in /home/oregonvd/public_html/html/buy.php on line 45 PHP: the code on my site basically just gets variables from the previous page and places it into session variables (code below). I'm using the session variables because there are multiple confirm pages that I didn't want to post data to every time. Here is the code that elicits the warning above session_start(); $_SESSION['Sessionname']=$name; PHP:
You can't send any output to the browser before starting the session. No white spaces before the opening <?php tag, and no HTML either. The session_start() has to go on top of everything.