Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New Coder
    Join Date
    Jun 2007
    Posts
    42
    Thanks
    11
    Thanked 0 Times in 0 Posts

    Question How to add parameter to a PHP file?

    Hi...
    How to add parameter to a PHP file, like http://www.domain.com/search.php?q=line1+line2+line3

    Thank you so much for helps.

    best regards

  • #2
    Senior Coder rafiki's Avatar
    Join Date
    Aug 2006
    Location
    Floating around somewhere...
    Posts
    2,042
    Thanks
    19
    Thanked 42 Times in 42 Posts
    http://www.com.com/search.php?q=line...n-gb&blah=ness
    PHP Code:
    $query $_GET['q']; // assign line 1 to $query
    $lang $_GET['lang']; // assign en-gb to $lang
    $blah $_GET['blah']; // assign ness to $blah
    do stuff

  • Users who have thanked rafiki for this post:

    frozenade (09-09-2007)

  • #3
    New Coder
    Join Date
    Jun 2007
    Posts
    42
    Thanks
    11
    Thanked 0 Times in 0 Posts
    thank you... your help is very usefull for me...

    how about '+' sign? how to implemented in address? like ...search.php?q=word1+word2

    thank you...

  • #4
    Regular Coder
    Join Date
    May 2006
    Location
    Wales
    Posts
    820
    Thanks
    1
    Thanked 82 Times in 79 Posts
    If you wanted a + you would need to put %2B in instead, look at this page if you want to include other characters


  •  

    Posting Permissions

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