ShaolinF Posted August 13, 2007 Share Posted August 13, 2007 Hi Guys, Im working on a help page where when a user has a problem he submits his username and password and it gets sent to me via email. The problem is, is the password they send me isnt their password. Its either something completely different or it has changes made to it. I tried this for myself and its really confused me. For example if I submit my details my username is fine but my password has \"\" etc replacing some of the words at the end of it and other times its not even my password! What makes it even more weird is sometimes it doesnt do this. Im a completely baffled as to why this is happening. Any ideas? Quote Link to comment https://forums.phpfreaks.com/topic/64723-password-not-real-password-s/ Share on other sites More sharing options...
the_oliver Posted August 13, 2007 Share Posted August 13, 2007 Can you show us your code? It looks to me like it might be due to strange charictos in the password? It could be that they are pasting into the field, from a strange char type. Its all gues work with out the code! Quote Link to comment https://forums.phpfreaks.com/topic/64723-password-not-real-password-s/#findComment-322792 Share on other sites More sharing options...
ShaolinF Posted August 13, 2007 Author Share Posted August 13, 2007 I will post the code inabit. My host did move to new servers and certain things weren#t working until I requested. Do you think he probably hasnt properly configured the php settings hence the problem ? Quote Link to comment https://forums.phpfreaks.com/topic/64723-password-not-real-password-s/#findComment-322802 Share on other sites More sharing options...
the_oliver Posted August 13, 2007 Share Posted August 13, 2007 It is possible, but sound unlikly. Try putting: header("Content-Type: text/html; charset=utf-8"); at the very top of the document, to see wheather its an incoding thing. Quote Link to comment https://forums.phpfreaks.com/topic/64723-password-not-real-password-s/#findComment-322807 Share on other sites More sharing options...
ShaolinF Posted August 13, 2007 Author Share Posted August 13, 2007 Ok, I managed to workout the problem but not solve it. Basically say for example I type in a quote " once I submit it and I get the email it outputs \" instead of " Quote Link to comment https://forums.phpfreaks.com/topic/64723-password-not-real-password-s/#findComment-322878 Share on other sites More sharing options...
reages Posted August 13, 2007 Share Posted August 13, 2007 please post your code so you could be advised properly. if the output is \" instead of just ", then the string(password) could probably contain \\"". if that's the case, use stripslashes(). again, please post your code. regards. Quote Link to comment https://forums.phpfreaks.com/topic/64723-password-not-real-password-s/#findComment-322914 Share on other sites More sharing options...
hostfreak Posted August 13, 2007 Share Posted August 13, 2007 http://www.php.net/manual/en/ref.info.php#ini.magic-quotes-gpc Quote Link to comment https://forums.phpfreaks.com/topic/64723-password-not-real-password-s/#findComment-322925 Share on other sites More sharing options...
hitman6003 Posted August 13, 2007 Share Posted August 13, 2007 As hostfreak referenced, the magic-quotes-gpc directive is turned on. You can either turn it off, or use stripslashes on your variable to remove them. http://www.php.net/stripslashes Quote Link to comment https://forums.phpfreaks.com/topic/64723-password-not-real-password-s/#findComment-322967 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.