i know im probably missing something here, but for some reason, if i use the following code directly into a file, it works perfectly.. however, trouble arises if i try to set it as a function within an included .php file or even
I'm not exactly sure how else to describe it or what other information is needed but its really getting on my nerves now lol .. im guessing it might be something within the function that only allows it to be executed within the main file? if so, is there any chance that an alternative could be suggested?
code placed directly into home.php and/or directly into the include file (not at the same time)
if($sid==""){
srand ((double) microtime( )*1000000);
$random_number = rand( );
$sid = md5($random_number);
}
code as a function
function checksid($sid){
if($sid==""){
srand ((double) microtime( )*1000000);
$random_number = rand( );
$sid = md5($random_number);
}
}