SitePoint Sponsor |
|
User Tag List
Results 1 to 3 of 3
Thread: passing/processing URL variables
-
Aug 21, 2000, 05:22 #1
- Join Date
- Jan 2000
- Posts
- 26
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
I forget how to parse the variables
passed on the URL like this:
<A HREF="http://www.mysite.com?bla="blahhh"" TARGET=_blank>http://www.mysite.com?bla="blahhh"</A>
How would I check this for a value and
add some code to a page if it is equal to
this value?
-
Aug 21, 2000, 19:12 #2
- Join Date
- Aug 1999
- Location
- Pittsburgh, PA, USA
- Posts
- 3,910
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
It depends...in PHP, it'd be like this:
<BLOCKQUOTE><font size="1" face="Verdana, Arial">code/font><HR><pre>
if ($action == "add") {
echo("This is the add page");
}
else if ($action == "search") {
echo("This is the search page");
}
else {
echo("Sorry, you didn't specify a valid action! What, are you stupid or something?");
}
[/code]
http://www.yoursite.com/page.php3?action=add would bring up the add page, action=search the search page, and so on.
Hope this helps.
------------------
Chris Bowyer – chris@mycoding.com
MyCoding.com: Visit for Launch Notification!
DomainMailings.com: Who Says All The Good Ones Are Taken?
MovieForums.com: Talk About Your Favorite Flicks!
[This message has been edited by TWTCommish (edited August 21, 2000).]
-
Aug 22, 2000, 03:13 #3
- Join Date
- Jan 2000
- Posts
- 26
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Oh, crap, I forgot to mention that I needed
it in javascript.
Bookmarks