Re: [PHP] plus sign has changed to space after POST
finally, I have this issue solved. I have recompiled PHP without this --enable-mbstr-enc-trans For those who said they have no problem with the + sign, tried to compile your PHP with the option above and tried it out!!! ;) I know this is not a PHP bug but I am curious how people handle the + sign issue when they have this option support in their php.. Chris Shiflett [EMAIL PROTECTED] 11/19/2002 11:32 PM Please respond to shiflett To: Hugh Danaher [EMAIL PROTECTED], [EMAIL PROTECTED] cc: Subject:Re: [PHP] plus sign has changed to space after POST That's a terrible idea. Not only does this avoid fixing the real issue (tries to fix the symptom instead of the problem), you're telling him to change all spaces to + signs. Imagine a form asking for your name. You enter Hugh Danaher only to see it translated into Hugh+Danaher on the server. Chris --- Hugh Danaher [EMAIL PROTECTED] wrote: Just do ereg_replace( ,+,$var) on the receiving end and be done with it. From: [EMAIL PROTECTED] After upgrade to 4.2.3, plus + sign has changed to space after POST. I have checked the mailing list but can't find any help to turn this off forever! is this a bug in PHP? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] plus sign has changed to space after POST
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Tuesday, November 19, 2002 6:43 PM To: [EMAIL PROTECTED] Subject: [PHP] plus sign has changed to space after POST After upgrade to 4.2.3, plus + sign has changed to space after POST. I have checked the mailing list but can't find any help to turn this off forever! is this a bug in PHP? thanks Spaces are encoded as plus signed or %20 in the URL, depending on the method you use. PHP will automatically urldecode() the values passed in the URL apparently. If you are trying to pass an actual + sign, you need to encode it with urlencode() or rawurlencode(). ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] plus sign has changed to space after POST
I have tried this but the problem is it change the other special character as well. For example, $ to %24, etc. If people pass a string like abc+def$ghi, I want to save the exact string to the database rather than abc+def%24ghi. I can't do a translation of %24 to $ before saving the string to the database because user might input a string like abc+%3423324hello%23ddd John W. Holmes [EMAIL PROTECTED] 11/19/2002 03:52 PM Please respond to holmes072000 To: [EMAIL PROTECTED], [EMAIL PROTECTED] cc: Subject:RE: [PHP] plus sign has changed to space after POST -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Tuesday, November 19, 2002 6:43 PM To: [EMAIL PROTECTED] Subject: [PHP] plus sign has changed to space after POST After upgrade to 4.2.3, plus + sign has changed to space after POST. I have checked the mailing list but can't find any help to turn this off forever! is this a bug in PHP? thanks Spaces are encoded as plus signed or %20 in the URL, depending on the method you use. PHP will automatically urldecode() the values passed in the URL apparently. If you are trying to pass an actual + sign, you need to encode it with urlencode() or rawurlencode(). ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] plus sign has changed to space after POST
might be my php code has problem the following code fragment will keep + to + but $ to %24 ? echo urlencode($_POST['test']); ? form action='testp.php' method=POST input type=text value='' name=test ?php $test=urldecode($test); ? input type=submit value='submit' /form John W. Holmes [EMAIL PROTECTED] 11/19/2002 04:12 PM Please respond to holmes072000 To: [EMAIL PROTECTED] cc: [EMAIL PROTECTED] Subject:RE: [PHP] plus sign has changed to space after POST You have to encode it on one end, and decode it on the other. Use $url_safe = urlencode($string); and pass $url_safe in the URL. Then on the receiving end, use $back_to_normal = urldecode($url_safe_string); ---John Holmes... -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Tuesday, November 19, 2002 7:06 PM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: [PHP] plus sign has changed to space after POST I have tried this but the problem is it change the other special character as well. For example, $ to %24, etc. If people pass a string like abc+def$ghi, I want to save the exact string to the database rather than abc+def%24ghi. I can't do a translation of %24 to $ before saving the string to the database because user might input a string like abc+%3423324hello%23ddd John W. Holmes [EMAIL PROTECTED] 11/19/2002 03:52 PM Please respond to holmes072000 To: [EMAIL PROTECTED], [EMAIL PROTECTED] cc: Subject:RE: [PHP] plus sign has changed to space after POST -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Tuesday, November 19, 2002 6:43 PM To: [EMAIL PROTECTED] Subject: [PHP] plus sign has changed to space after POST After upgrade to 4.2.3, plus + sign has changed to space after POST. I have checked the mailing list but can't find any help to turn this off forever! is this a bug in PHP? thanks Spaces are encoded as plus signed or %20 in the URL, depending on the method you use. PHP will automatically urldecode() the values passed in the URL apparently. If you are trying to pass an actual + sign, you need to encode it with urlencode() or rawurlencode(). ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] plus sign has changed to space after POST
might be my php code has problem the following code fragment will keep + to + but $ to %24 That's what urlencode() is supposed to do. ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] plus sign has changed to space after POST
This is the problem that I describe earlier in the thread. I can't save %24 in the database but $. ie a user send a string abc+def$ghi, I need to get the exact string back but not abc+def%24ghi. so is this a bug in PHP?? John W. Holmes [EMAIL PROTECTED] 11/19/2002 04:46 PM Please respond to holmes072000 To: [EMAIL PROTECTED] cc: [EMAIL PROTECTED] Subject:RE: [PHP] plus sign has changed to space after POST might be my php code has problem the following code fragment will keep + to + but $ to %24 That's what urlencode() is supposed to do. ---John Holmes...
RE: [PHP] plus sign has changed to space after POST
Show your code. If I pass a + sign in a form, it comes out as a plus sign in my data... I don't see your problem unless I do something like this: $data = abc+def$ghi; echo a href='link.php?data=$data'Click Here/a; Which is solved by using urlencode() before you place it in the link. ---John Holmes... -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Tuesday, November 19, 2002 10:53 PM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: RE: [PHP] plus sign has changed to space after POST This is the problem that I describe earlier in the thread. I can't save %24 in the database but $. ie a user send a string abc+def$ghi, I need to get the exact string back but not abc+def%24ghi. so is this a bug in PHP?? John W. Holmes [EMAIL PROTECTED] 11/19/2002 04:46 PM Please respond to holmes072000 To: [EMAIL PROTECTED] cc: [EMAIL PROTECTED] Subject:RE: [PHP] plus sign has changed to space after POST might be my php code has problem the following code fragment will keep + to + but $ to %24 That's what urlencode() is supposed to do. ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] plus sign has changed to space after POST
I don't believe it has anything to do with PHP, to be honest. I've got scripts that are several versions of PHP old that do that. However, it makes no difference in execution of the script. case show roster: { ... } catches submit=show+roster quite nicely. Bob - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, November 19, 2002 3:42 PM Subject: [PHP] plus sign has changed to space after POST After upgrade to 4.2.3, plus + sign has changed to space after POST. I have checked the mailing list but can't find any help to turn this off forever! is this a bug in PHP? thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] plus sign has changed to space after POST
Just do ereg_replace( ,+,$var) on the receiving end and be done with it. - Original Message - From: Bob Eldred [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, November 19, 2002 11:24 PM Subject: Re: [PHP] plus sign has changed to space after POST I don't believe it has anything to do with PHP, to be honest. I've got scripts that are several versions of PHP old that do that. However, it makes no difference in execution of the script. case show roster: { ... } catches submit=show+roster quite nicely. Bob - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, November 19, 2002 3:42 PM Subject: [PHP] plus sign has changed to space after POST After upgrade to 4.2.3, plus + sign has changed to space after POST. I have checked the mailing list but can't find any help to turn this off forever! is this a bug in PHP? thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] plus sign has changed to space after POST
That's a terrible idea. Not only does this avoid fixing the real issue (tries to fix the symptom instead of the problem), you're telling him to change all spaces to + signs. Imagine a form asking for your name. You enter Hugh Danaher only to see it translated into Hugh+Danaher on the server. Chris --- Hugh Danaher [EMAIL PROTECTED] wrote: Just do ereg_replace( ,+,$var) on the receiving end and be done with it. From: [EMAIL PROTECTED] After upgrade to 4.2.3, plus + sign has changed to space after POST. I have checked the mailing list but can't find any help to turn this off forever! is this a bug in PHP? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php