Getting Parameters from URL
Posted: Tue May 04, 2010 1:02 pm
Its been a while since I used PHP so trying to install some scripts onto my new web host, and the parameters being passed via the URL no longer seem to work.
So the url is basically
a_story.php?called=MyLife
My previous code and web host works fine as I didn't need to use $_GET to access the variable. However I presume things have moved on. However when I update my code so I do
$tmpvar = $_GET['called'];
echo "Storyname=".$tmpvar;
I still get nothing output at all. The host I am with is JustHost, and the only thing I can think that may is preventing me using this is register_globals = off (still reading up on this).
Can anyone help and probably point me to a good tutorial if I need to use an alternative?
Thanks
So the url is basically
a_story.php?called=MyLife
My previous code and web host works fine as I didn't need to use $_GET to access the variable. However I presume things have moved on. However when I update my code so I do
$tmpvar = $_GET['called'];
echo "Storyname=".$tmpvar;
I still get nothing output at all. The host I am with is JustHost, and the only thing I can think that may is preventing me using this is register_globals = off (still reading up on this).
Can anyone help and probably point me to a good tutorial if I need to use an alternative?
Thanks