I'm hoping someone can help me with this. I've seen and tried various
solutions I've seen on the net, but nothing works.
Of course it works perfectly on localhost, but when I upload it to the
server (1and1.com) it gives errors. The user enters a code, the code is
verified, a new one is created and it's supposed to send them to the next
page.
if (CodeExist($cCode) > 0){
$cNewCode = MakeCode();
$ok = InsertRec($cNewCode);
ob_start(); // doesn't matter if I leave this in or take it out.
session_cache_limiter('public'); // suggestion from the internet. No
effect :(
session_start();
$_SESSION['newcode'] = $cNewCode;
print "session is set to:".$_SESSION['newcode'];
header("Location: info.php");
exit;
And here's the output. Notice that the session was set even through the
error messages:
Warning: Cannot send session cookie - headers already sent by (output
started at /devel/joinnow.php:4) in /devel/joinnow.php on line 20
Warning: Cannot send session cache limiter - headers already sent (output
started at /devel/joinnow.php:4) in /devel/joinnow.php on line 20
session is set to:JSG598
Warning: Cannot add header information - headers already sent by (output
started at /devel/joinnow.php:4) in /devel/joinnow.php on line 25
Any help would be extremely helpful!
Thanks!!