SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Hybrid View

  1. #1
    SitePoint Enthusiast
    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?

  2. #2
    SitePoint Wizard TWTCommish's Avatar
    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).]

  3. #3
    SitePoint Enthusiast
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •