Re: $_get 2 variables

From: Date: Wed, 20 Nov 2002 06:37:10 +0000
Subject: Re: $_get 2 variables
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-23505@lists.php.net to get a copy of this message
Quoting Gavin Amm <gavin@ksg.com.au>: > Hi, > > I'm wanting to retrieve data from my database using 2 conditions in the > WHERE clause. > How do i pick up 2 different variables from the URL? > > i can get just 1 variable easily (eg: > http://localhost/myscript.php?var1=blah) > My question essentially is: what string do do i need to type into the URL to > pick up the 2 variables like this: > $var1 = $_GET['var1']; > $var2 = $_get['var2']; > > Do I need to start messing around with strings? or is there an easy way? > > Thanks, > Gav Try: http://localhost/myscript.php?var=foo&var2=bar '&' is the default url parameter seperator. The rest of your code looks fine. (course there are lots of other ways to go about it). --Ryan -- Ryan T. Gallagher ryan@studiesabroad.com International Studies Abroad http://www.studiesabroad.com (512)480-8522

« previous php.db (#23505) next »