[thelist] PHP register_globals
Gordon MacLeod
gomac11 at rogers.com
Wed Jun 2 13:12:19 CDT 2004
-----Original Message-----
So what I'm wondering is how you make use of the query string
www.somesite.com/file.php?var1=something
-------------------
A couple of ways. First to obatain a URL encoded passed variable such as
the above example you put this at the top of the page:
$var1 = $_GET['var1'];
THEN DO STUFF WITH $var1;
Or if you have a situation where the argument for var1 is not passed
(i.e. www.somesite.com/file.php) than do an if-else for it being set:
if(!isset($_GET['var1'])){
DO STUFF;
} else {
DO OTHER STUFF;
}
There are many other ways, but this should get you started.
Gord
«¤»¥«¤»§«¤»¥«¤»§«¤»¥«¤»§«¤»¥«¤»§«¤
http://gord.macleod.name
«¤»¥«¤»§«¤»¥«¤»§«¤»¥«¤»§«¤»¥«¤»§«¤
More information about the thelist
mailing list