Re: Plus sign changing to space in html form

From: Date: Thu, 31 Oct 2002 09:50:20 +0000
Subject: Re: Plus sign changing to space in html form
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-122220@lists.php.net to get a copy of this message
I am battling with the same problem on both IE and Netscape on Mac OS 10.2. Is this a Mac thing? I ammended your code in the hope that something was being passed that only looked like a space.. <?php echo $_POST['test'].'<br>'; for($n=1;$n<=strlen($_POST['test']);$n++) { echo var_dump(hexdec(substr($_POST['test'],$n-1,1))); } php?> <form actiom='test.php' method=POST> <input type=text value='' name=test> <input type=submit value='submit'> </form> If I enter a+b it returns: a b int(10) int(0) int(11) I can't ask users to enter a<PLUS>b or some such code, there must be a solution. I don't belive this is going to defeat the collective brains of the PHP list! Phoebe. Stan wrote:
When i post a string containing plus sign with htmp form to a php scritp, the '+' is changed to space. e.g: i enter 'as+df' to a text input but $_POST[] returns 'as df' instead. It must be in php or apache configuration bcause i have this problem only on sytem with FreeBSD. On windows it works as expected. Know someone how could i make the '+' left intact? Please help. <? echo $_POST['test']; ?> <form actiom='test.php' method=POST> <input type=text value='' name=test> <input type=submit value='submit'> </form>


« previous php.general (#122220) next »