CosmosRP Posted February 23, 2011 Share Posted February 23, 2011 Is there a way to keep people from executing code, but allowing < and >'s? I don't want to convert them to their HTML entities ( ex. < ), I want to keep them the way they are. But I don't want people typing <script> and what not. Link to comment https://forums.phpfreaks.com/topic/228560-is-there-any-way/ Share on other sites More sharing options...
robert_gsfame Posted February 23, 2011 Share Posted February 23, 2011 i don't know if there is better suggestion from experts here..but i will try to validate text using javascript then. using indexOf() Link to comment https://forums.phpfreaks.com/topic/228560-is-there-any-way/#findComment-1178484 Share on other sites More sharing options...
robert_gsfame Posted February 23, 2011 Share Posted February 23, 2011 another thing, i assume you want to insert data into database. Then you can use mysql_real_escape_string() and stripslashes() Link to comment https://forums.phpfreaks.com/topic/228560-is-there-any-way/#findComment-1178486 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.