coops Posted October 8, 2007 Share Posted October 8, 2007 Hello, I’m trying to do a php login system using a form on the main page and then a XML data store on the other side. I seem to be having problems when using some character within the text input box. The characters are £ or ‘. It automatically convert the character to a html code. So ‘ convert to \’ etc. So when it is place through the validation or straight into the xml it falls down….. The set up I am using, is an input text box on the form page, then I would use $_POST to retrieve the data from the form. I have tried using html_entity_decode() php internal function, but it doesn’t seem to do anything….. Has anyone else had this problem and if so how did they get around this? Thanks Link to comment https://forums.phpfreaks.com/topic/72279-forms-converting-character-to-html-code/ Share on other sites More sharing options...
TomKrush Posted October 8, 2007 Share Posted October 8, 2007 Instead of using html_enitity_decode() try html_entities. I say this because you have a character example '&'. Your code tells the the form to put a & inside. But the form outputs a &. It is slightly annoying. But what the form needs to see so it executes correctly is &. The logic of that will make much more since when you see it in the form. Link to comment https://forums.phpfreaks.com/topic/72279-forms-converting-character-to-html-code/#findComment-364647 Share on other sites More sharing options...
Mr P!nk Posted October 8, 2007 Share Posted October 8, 2007 Will this work also with code outputting " as \" ? Link to comment https://forums.phpfreaks.com/topic/72279-forms-converting-character-to-html-code/#findComment-364661 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.