Jump to content

how to prevent html injection


xeonyk

Recommended Posts

i have this case :

 

i store database from the text box and i show it the database value to my page.

 

how to prevent if user input html text into textbox and when before i want to store the value from textbox to database, it will check is the input is html or not. so when i show database value to my page the html script not print.

 

example like this :

 

<a href src="http://www.google.com">google</a>

 

when i submit this topic this will show as text not a link

 

thx

Link to comment
https://forums.phpfreaks.com/topic/54854-how-to-prevent-html-injection/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.