if you are here, you are wondering how you can use a variable through out the script.

if you are going to use a variable in a function for example this is how i would do it. for example:


$myname = 'wallpaperama';
function ShowMyName(){
return $myname ;
}
echo ShowMyName();



if you look at the code above, it would not work, you would have to call the string called $myname within the function so the code should look like this:




$myname = 'wallpaperama';
function ShowMyName(){
global $myname;
return $myname ;
}
echo ShowMyName();


another way you can declare globals are with $GLOBALS[]

for example:
$GLOBALS["myname] = "wallpaperama";

echo $GLOBALS["myname];