Hide GET variables

Discussion in 'PHP' started by emi87, Jun 29, 2009.

  1. #1
    Hello,
    Please tell me how can I hide Get variables..

    I have the link check.php?name=john&age=18

    I would like that those variables not show


    Thank you!
     
    emi87, Jun 29, 2009 IP
  2. e2developer

    e2developer Peon

    Messages:
    31
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    simply you can use post method or if you are sending these variables through link than
    you can create a form including these variables and can submit on click of that link.

    I think it will help you.
     
    e2developer, Jun 29, 2009 IP
  3. emi87

    emi87 Peon

    Messages:
    49
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    I have a login script with 3 files:

    1. form (post with username and password)..here I send the username variable to the checking file
    2. check the username and password.. (and if correct it set the header to the member area)..header("location:area.php); ..and here I want to send also the username to the member area. I have set: header("location:area.php?username=$username); and it is working but I don't want to appear the username up in the url in browser. I want to hide the username if it is possible.
    3. member area
     
    emi87, Jun 29, 2009 IP
  4. emi87

    emi87 Peon

    Messages:
    49
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    emi87, Jun 29, 2009 IP
  5. nishanair

    nishanair Active Member

    Messages:
    188
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    53
    #5
    use Session or Cookie or Post
     
    nishanair, Jun 29, 2009 IP
  6. emi87

    emi87 Peon

    Messages:
    49
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    nishanair please tell me how to use session
     
    emi87, Jun 29, 2009 IP
  7. Goramba

    Goramba Peon

    Messages:
    128
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    0
    #7
    just change method=get to method=post on the form and then on the receiving page change $_GET to $_POST.
     
    Goramba, Jun 29, 2009 IP
  8. anthonywebs

    anthonywebs Banned

    Messages:
    657
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    0
    #8
    Use ajax. I myself do not know ajax, but google it, I know that ajax can do stufff like that
     
    anthonywebs, Jun 29, 2009 IP
  9. Bohra

    Bohra Prominent Member

    Messages:
    12,573
    Likes Received:
    537
    Best Answers:
    0
    Trophy Points:
    310
    #9
    Yes rite shift from $_GET to $_POST
     
    Bohra, Jun 29, 2009 IP