I'm new to sessions, and I'm just trying the most basic script for now:
<?php
// if a session does not yet exist for this user, start one
$id2=session_id();
if ($id2==false){
echo "session did not exist \n";
session_start();
session_register('count');
}
else { $id2=session_id(); session_start($id2); }
// increment count
$count++;
echo "You have been here $count times";
?>
It's a bit messy, but that's what happens when trying to fix problems.
ANyway, the error I keep on getting is this:
Warning: Cannot send session cookie - headers already sent by (output started at /home2/sserver/public_html/menu.txt:2) in /home2/sserver/public_html/menu.txt on line 8
Warning: Cannot send session cache limiter - headers already sent (output started at /home2/sserver/public_html/menu.txt:2) in /home2/sserver/public_html/menu.txt on line 8
Anyone have any idea what I may be doing wrong?
Thanks in advance to all who help,
Manuel