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 ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
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 |
|
|||
|
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 |
|
|||
|
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 |