Results 1 to 5 of 5

Thread: values passed in URL [Resolved]

  1. #1

    Thread Starter
    Frenzied Member ober0330's Avatar
    Join Date
    Dec 2001
    Location
    OH, USA
    Posts
    1,945

    values passed in URL [Resolved]

    If I there is a space that is submitted in a form as a value in a textbox, it puts it in the URL as %A0. This is causing problems in my update statement because it says it can't convert a varchar to a float.

    Does anyone know how to get around that or deal with the %A0, which prints out as a space even after a trim?
    Last edited by ober0330; Jun 11th, 2004 at 10:40 AM.
    format your code!! - [vbcode] [/vbcode]

    ANSWERS CAN BE FOUND HERE!!

    my personal company

  2. #2
    Ex-Super Mod'rater Electroman's Avatar
    Join Date
    Sep 2000
    Location
    Newcastle, England
    Posts
    4,349
    I don't understand the probelm here? And doesn't a space turn into %20 ?

    If in the Text box it was a space then in the URL it will be %20 then when you read it in through the $_GET['name'] it will have been changed back into a space for you?
    When your thread has been resolved please edit the original post in the thread ()
    and amend "-[RESOLVED]-" to the end of the title and change the icon to , Thank you.

    When posting Code use the [VBCode]Code Here[/VBCode] tags to be able to use the code highlighting.

  3. #3

    Thread Starter
    Frenzied Member ober0330's Avatar
    Join Date
    Dec 2001
    Location
    OH, USA
    Posts
    1,945
    Ok, well it must not be a space then, because nothing I do works and it's throwing an error saying my SQL statement is invalid. If I go back to the page there is a space in the textbox, and if I hit the backspace key and hit submit again, the UPDATE works, and the value being passed is nothing, where before it was "%A0".

    format your code!! - [vbcode] [/vbcode]

    ANSWERS CAN BE FOUND HERE!!

    my personal company

  4. #4
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,687
    Before adding it to your sql insert, you need to use urldecode

    TG
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  5. #5

    Thread Starter
    Frenzied Member ober0330's Avatar
    Join Date
    Dec 2001
    Location
    OH, USA
    Posts
    1,945
    I ended up doing this:
    PHP Code:
    if($val != urldecode('%A0'
    and that seems to work.
    format your code!! - [vbcode] [/vbcode]

    ANSWERS CAN BE FOUND HERE!!

    my personal company

Posting Permissions

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



Click Here to Expand Forum to Full Width