Thread: Query Strings

    #1
  1. No Profile Picture
    Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2000
    Location
    England, UK
    Posts
    83
    Rep Power
    15
    I use query strings like this:

    mypage.php3?q1=query1&q2=query2

    Then I can use them as variables:

    $q1 = query1 / $q2 = query2

    This works fine. I have seen sites that do it like this:

    mypage.php3/q1=query1/q2=query2/

    How?

    Girish Gupta
    webmaster@musicgoeson.com
  2. #2
  3. No Profile Picture
    Apprentice Deity
    Devshed Loyal (3000 - 3499 posts)

    Join Date
    Jul 1999
    Location
    Niagara Falls (On the wrong side of the gorge)
    Posts
    3,237
    Rep Power
    19
    There are a few ways. One is to use mod_rewrite if you are using Apache. There's an article on www.phpbuilder.com on how to set that up.

    One word of caution. I wouldn't go around passing full queries from page to page. Anyone could type a query into their URL bar and screw up your db.

Similar Threads

  1. query syntax error
    By collegebloke in forum MS SQL Development
    Replies: 1
    Last Post: January 19th, 2004, 05:08 PM
  2. Overwriting mysql query with the query results
    By onerandomday in forum PHP Development
    Replies: 1
    Last Post: January 14th, 2004, 05:45 AM
  3. Syntax error in INSERT INTO query
    By Lee Miles in forum Visual Basic Programming
    Replies: 6
    Last Post: December 19th, 2003, 08:37 AM
  4. nested query and MySQL query
    By lucipher in forum MySQL Help
    Replies: 1
    Last Post: November 19th, 2003, 11:49 AM
  5. Multiple sums in one query, and maximum query length
    By NakedSavage in forum MySQL Help
    Replies: 1
    Last Post: November 14th, 2003, 04:28 PM

IMN logo majestic logo threadwatch logo seochat tools logo