SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Thread: URL encoding

  1. #1
    SitePoint Member
    Join Date
    Dec 2004
    Location
    Cumbria, UK
    Posts
    18
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    URL encoding

    I am trying to pass an SQL query as a URL parameter but it contains the characters + and %.

    As these characters are used in the encoding of a URL I get unexpected results.

    Is there a way round this problem?

  2. #2
    SitePoint Wizard HarryR's Avatar
    Join Date
    Dec 2004
    Location
    London, UK
    Posts
    1,376
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Before I go any further, I really should point out that unless you have very very good reasons for passing SQL through untrusted users, then you really should stay well clear of it and find an alternative.

    See the URLencode and URLdecode functions used at: http://www.albionresearch.com/misc/urlencode.php


Bookmarks

Posting Permissions

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