[thelist] $HTTP_POST_VARS returning incorrect data

Mark Groen evolt at markgroen.com
Sat Dec 1 09:04:38 CST 2007

On Friday 30 November 2007 22:01, Santilal Parbhu wrote:
> ...
> I think I might be on to something.  The data that is returned by
> $HTTP_POST VARS is read from a form, which is populated with data from
> MySQL.  In other words the Blue Lamas,A,34 is read from MySQL, along with
> other options that the user picks from.  When the user picks one of these
> and hits submit the chosen data is sent back.  So the problem could lie in
> the way MySQL fills in the space.
> I have used the exact code in other places, but in all of these (I think)
> the data is entered by the user.  So does anyone know what MySQL puts in
> the space and how I can get it recognized as a space?

Replace the whitespace with either %20 or + work for you?

$string = ereg_replace(" ", "%20", $HTTP_POST_VARS);
$string = ereg_replace(" ", "+", $HTTP_POST_VARS);


More information about the thelist mailing list