|
-
Jun 10th, 2004, 02:45 PM
#1
Thread Starter
Frenzied Member
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.
-
Jun 10th, 2004, 05:58 PM
#2
Ex-Super Mod'rater
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.

-
Jun 11th, 2004, 07:03 AM
#3
Thread Starter
Frenzied Member
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".
-
Jun 11th, 2004, 08:11 AM
#4
Before adding it to your sql insert, you need to use urldecode
TG
-
Jun 11th, 2004, 10:18 AM
#5
Thread Starter
Frenzied Member
I ended up doing this:
PHP Code:
if($val != urldecode('%A0')
and that seems to work.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|