I want to check if the session id has been created otherwise create one. I used this code but it doesnt seem to work:
<?
if(isset(session_id))
{
echo "session has started";
}
else {
<?
$time = time();
$date = $today = date("Ymd");
$id = $time + $date;
session_id($id);
session_start();
session_register(session_id);
print session_id();
echo "time = $time";
echo "date = $date";
?>
I placed this at the top of the page with some html coding under it but the page appears blank for some reason, what is another way of doing this or am i doing something wrong?