HueyJib Posted September 26, 2008 Share Posted September 26, 2008 I'm using $_POST to send info into a database table. I echo it onto the website (it's a pastebin site). One time I pasted a php/html code and it turned out it actually did the code as if I wanted it to work. For example, if I pasted this: <a href="http://www.phpfreaks.com/forums">PHP Help Forum</a> It would come out like this: PHP Help Forum How do I turn script code into raw text so it doesn't do the example above. Link to comment https://forums.phpfreaks.com/topic/125876-need-help-again/ Share on other sites More sharing options...
Barand Posted September 26, 2008 Share Posted September 26, 2008 echo htmlentities('<a href="http://www.phpfreaks.com/forums">PHP Help Forum</a>'); (Not Mysql. Moving to PHP Help.) Link to comment https://forums.phpfreaks.com/topic/125876-need-help-again/#findComment-651436 Share on other sites More sharing options...
Stryves Posted September 26, 2008 Share Posted September 26, 2008 Without the code, not sure, but I'd have it so that it spits out http://www.phpfreaks.com/forums at PHP Help Forum Link to comment https://forums.phpfreaks.com/topic/125876-need-help-again/#findComment-651450 Share on other sites More sharing options...
HueyJib Posted September 26, 2008 Author Share Posted September 26, 2008 Thanks for replies. But it's not just html, it is for every type of language, it evaluates the codes. I want everything that I echo to be raw text. Link to comment https://forums.phpfreaks.com/topic/125876-need-help-again/#findComment-651492 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.