why this function is returning null
| From: | hassan omar | Date: | Fri, 07 Jul 2000 16:17:30 +0000 |
| Subject: | why this function is returning null | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-5402@lists.php.net to get a copy of this message | ||
I copied the following function from "core php". it is returning nothing. what is wrong???
please help
<?php
function sessionId($len=8)
{
$pool = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
$pool.= "abcdefghijklmnopqrstuvwxyz";
srand((double)microtime()*1000000);
for($i = 0; $i < $len; $i++)
{
$sid .= substr($pool, (rand()%(strlen($pool))),1);
}
return($sid);
}
# srand(time());
$session = sessionId(8);
echo "There is a sessionId set<br>";
echo "you will see it<br>";
echo "$ession";
echo "</body>";
echo "</html>";
?>
Thank in advance