Hi,
I have the following code:
<?php
session_start();
if (!$PHPSESSID)
{
session_register('uid');
}
?>
<HEAD>
<?php
global $uid;
echo "uid = " . $uid;
?>
Scenerio:
User enters http://.../test.php?uid=xyz
(ie the url containing the above code)
The session var contains: "def"
Problem:
I get the following output:
uid = xyz
I want the following output:
uid = def
How can I get the desired output - i.e., is there a way I can differentiate between a global variable (that has page scope) and a session variable?
Many thanks for any help in advance!
Dipen