Topic awaiting preservation: php url check then echo acordingly.. |
|
---|---|
Author | Thread |
Paranoid (IV) Inmate From: under your rug, |
posted 12-12-2002 22:55
Basicly i want to check what's in their url bar and change a small section of content based upon it |
Paranoid (IV) Inmate From: Behind the Wheel |
posted 12-13-2002 00:09
the "id=1" in your url will be a php variable in the page - a url encoded variable in fact. code: if($id == "1"){
|
Paranoid (IV) Inmate From: 127.0.0.1 |
posted 12-13-2002 00:29 |
Paranoid (IV) Inmate From: Milwaukee |
posted 12-13-2002 00:53
If register_globals is turned off (the default for newer versions of PHP), you'll have to |
Paranoid (IV) Inmate From: under your rug, |
posted 12-13-2002 02:27
Wow thaks so much guys, exactly what I needed |
Paranoid (IV) Inmate From: Milwaukee |
posted 12-13-2002 07:38
Definitely! If register_globals is turned on, then ANYTHING you put in your querystring becomes a variable in your script! |
Paranoid (IV) Inmate From: under your rug, |
posted 12-13-2002 19:03
Thanks for all the info Perfect Thunder, i'll go turn that back off now |
Maniac (V) Mad Scientist From: 100101010011 <-- right about here |
posted 12-13-2002 21:03
The choice between Switch and if/else is mostly personal they will do the same thingsb |
Bipolar (III) Inmate From: the uterus |
posted 12-14-2002 12:57
The decisions between using things such as if/else, switch, or pre-initialized data is very dependent on what you are trying to accomplish at the time. |
Bipolar (III) Inmate From: Victoria, BC |
posted 12-17-2002 23:01
Forgive me if i'm wrong, i just started learning php, but... |
Paranoid (IV) Inmate From: under your rug, |
posted 12-20-2002 20:13
Thanks guys, yes Rooster that is what I wanted to know |