%20 char disables query

This is a discussion on %20 char disables query within the PHP Language forums, part of the PHP Programming Forums category; hi all, I have a site where a user can enter text (newspost). I recently discovered that when %20 is ...


Go Back   Usenet Forums > PHP Programming Forums > PHP Language

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 10-21-2004
Stijn Goris
 
Posts: n/a
Default %20 char disables query

hi all,

I have a site where a user can enter text (newspost). I recently discovered
that when %20 is entered the text is properly inserted in the database
(INSERT) but isn't shown on the page isn't shown on the page (SELECT).

The text is shown via printf(nl2br(stripslashes($myrow[1]))); where myrow[1]
is the text containing the %20 . Someone knows whats goin on?

Regards
Stijn


Reply With Quote
  #2 (permalink)  
Old 10-21-2004
Ken Robinson
 
Posts: n/a
Default Re: %20 char disables query


Stijn Goris wrote (in part):
> hi all,
>
> I have a site where a user can enter text (newspost). I recently

discovered
> that when %20 is entered the text is properly inserted in the

database
> (INSERT) but isn't shown on the page isn't shown on the page

(SELECT).
>
> The text is shown via printf(nl2br(stripslashes($myrow[1]))); where

myrow[1]
> is the text containing the %20 . Someone knows whats goin on?


The string '%20' is the urlencoded value for a space character. If
you're not enclosing your value in quotes, then the statement would
include the entire string.
To really help you, we have to see more of your code.

Ken

Reply With Quote
  #3 (permalink)  
Old 10-21-2004
Ken Robinson
 
Posts: n/a
Default Re: %20 char disables query


Stijn Goris wrote (in part):
> hi all,
>
> I have a site where a user can enter text (newspost). I recently

discovered
> that when %20 is entered the text is properly inserted in the

database
> (INSERT) but isn't shown on the page isn't shown on the page

(SELECT).
>
> The text is shown via printf(nl2br(stripslashes($myrow[1]))); where

myrow[1]
> is the text containing the %20 . Someone knows whats goin on?


The string '%20' is the urlencoded value for a space character. If
you're not enclosing your value in quotes, then the statement would
include the entire string.
To really help you, we have to see more of your code.

Ken

Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 08:20 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0