Hi, any expect pls come in to help..

Discussion in 'PHP' started by mcdeere02, Aug 7, 2009.

Thread Status:
Not open for further replies.
  1. #1
    can i know that what the advantage for using $_GET, and usually it apply in which type of script??can i have some example for view,as i know that this was not suitable for login page that include "password" text... can anyone provide me some explanation because i am confused about it....thank in advance
     
    mcdeere02, Aug 7, 2009 IP
  2. zeronese

    zeronese Peon

    Messages:
    83
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #2
    The get action type is useful in many situations where you need the parameters of your form to be in thue url. Note that, $_GET is not received only from submitted forms, you can also get byb passing it to the url.

    good examples for using the $_GET are:
    1- Paging: you need to pass the page number to get the appropriate results.
    2- Search Forms.
    3- dynamic programming and passing page id through the url.
    etc...
     
    zeronese, Aug 7, 2009 IP
  3. oop

    oop Peon

    Messages:
    35
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #3
    The main avantages of using get is the ID advantage

    you want people to copy the link to the page there on and send it to a friend

    by not using GET they cant do this as the ID for the article/whatever due to the fact that POST is sent once only

    so you can use post to send them to a page called article.php with the article ID as 22 but if they was to copy the url and send it to a friend they would not get to the article

    using get allowes you to send certain variables withc can be copied or bookmarked etc
     
    oop, Aug 7, 2009 IP
Thread Status:
Not open for further replies.