simonp Posted March 1, 2009 Share Posted March 1, 2009 I'm passing an encrypted string to a PHP script but if the string includes a plus sign it gets replaced with a space!? WTF?! Eg: https://www.xxx.com/login.php?u=abc&p=nqB7tQflgsxR4Zag7eAl1ngujbHn+4gKm3rcKLmA1tg= I then use: $encryptedpass = $_GET['p']; but $encryptedpass equals nqB7tQflgsxR4Zag7eAl1ngujbHn 4gKm3rcKLmA1tg= (note the plus sign halfway through has been replaced with a space) How can I stop this happening? Is there a chance other characters could cause a problem? Thanks Simon Link to comment https://forums.phpfreaks.com/topic/147407-solved-_get-missing-characters/ Share on other sites More sharing options...
trq Posted March 1, 2009 Share Posted March 1, 2009 urlencode, urldecode. Link to comment https://forums.phpfreaks.com/topic/147407-solved-_get-missing-characters/#findComment-773697 Share on other sites More sharing options...
simonp Posted March 1, 2009 Author Share Posted March 1, 2009 Thanks thorpe - that worked a treat Cheers Simon Link to comment https://forums.phpfreaks.com/topic/147407-solved-_get-missing-characters/#findComment-773712 Share on other sites More sharing options...
killah Posted March 1, 2009 Share Posted March 1, 2009 As for the reason why it replaced it with a space. When a url has a + in it and then you are trying to display it or inserting it, it make's that + a space. Link to comment https://forums.phpfreaks.com/topic/147407-solved-_get-missing-characters/#findComment-773717 Share on other sites More sharing options...
simonp Posted March 1, 2009 Author Share Posted March 1, 2009 As for the reason why it replaced it with a space. When a url has a + in it and then you are trying to display it or inserting it, it make's that + a space. Understood. Cheers. Link to comment https://forums.phpfreaks.com/topic/147407-solved-_get-missing-characters/#findComment-773719 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.