www.webdeveloper.com
Results 1 to 3 of 3

Thread: passing a query using href=? and php

  1. #1
    Join Date
    Dec 2005
    Location
    Austin, TX.
    Posts
    5

    Question passing a query using href=? and php

    I am trying to pass variable contents using:

    <a href="test2.php?test=test">This is a test</a>

    However, when I:

    <?php

    echo $_POST['test'];
    ?>

    in test2.php, it prints nothing. I don't have a clue what I am doing wrong as I have never tryd this before. I'm not feeling very tall right now. Anyone have some suggestions?

  2. #2
    Join Date
    Aug 2004
    Location
    Ankh-Morpork
    Posts
    19,322
    PHP Code:
     echo $_GET['test']; 
    URL's are passed via the get method, not post.
    "Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
    ~ Terry Pratchett in Nation

    eBookworm.us

  3. #3
    Join Date
    Dec 2005
    Location
    Austin, TX.
    Posts
    5

    Thankyou

    Thankyou thankyou. I will try that.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles