passing the variable using ?name=blah

Need help installing PHP, configuring a script, or configuring a server? Then come on in and post your questions! We'll try to help the best we can!

Moderator: General Moderators

Post Reply
User avatar
sutejok
Forum Commoner
Posts: 37
Joined: Wed Mar 24, 2004 4:08 pm

passing the variable using ?name=blah

Post by sutejok »

Hi, what do i have to set so that i'm able to pass variable this way

<a href="index.php?name=blah"> click here </a>

such that when i "echo $name" in the index.php, it will show "blah"

is it due to my setting in php or apache? i'm using php5..

pls helppppppppppppp thxxxxxxx
User avatar
wwwapu
Forum Contributor
Posts: 197
Joined: Wed Apr 07, 2004 11:57 am
Location: Turku, Finland

Post by wwwapu »

In php.ini there is a line that says register_globals=Off Turning this On echo $name works. Note that it is Off on purpose (security issues) and you should rather do echo $_GET["name"]
Post Reply