how can i passed the parameters in URL

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • manjava
    New Member
    • Sep 2009
    • 132

    how can i passed the parameters in URL

    hello,

    i have the query SQL i want to passed this parameters in URL :http://www.mydomain.co m/getrooms.html?l ogin=xxx&passwo rd=yyyyy&hotelC ode=12340

    so i write this code
    Code:
    SELECT * FROM dule_1,dule_13,dule_75
    can any one answer me

    thanks in advance
  • Atli
    Recognized Expert Expert
    • Nov 2006
    • 5062

    #2
    That makes no sense. How is the SQL query related to the parameters in the URL?

    Comment

    • manjava
      New Member
      • Sep 2009
      • 132

      #3
      so i want for exemple this URL :
      Code:
      http://www.mydomain.com/getrooms.html?login=xxx&password=yyyyy&hotelCode=1 2340
      on where id=$id and login=$login & pass=$pass passed on URL to receive the response

      Thank you

      Comment

      • Atli
        Recognized Expert Expert
        • Nov 2006
        • 5062

        #4
        Getting values from the query string is simple. You just use the $_GET array to fetch them.

        What I don't get is what this has to do with your SQL query?

        P.S.
        You really shouldn't pass a password through the query string. For normal requests, they are displayed in the browser, and usually cached in the browser history. Even if it's an AJAX request, you still want to avoid it. You don't want passwords to be handled in the open like that. Always use POST for passwords.

        Comment

        • manjava
          New Member
          • Sep 2009
          • 132

          #5
          ok Atli thank you very much

          Comment

          Working...