Learn How To Prevent HTMLTags Into Forms PHP Javascript SSI Tutorial Guide

Mobile
feeds
Welcome Login | Register

Learn How To Prevent HTMLTags Into Forms PHP Javascript SSI Tutorial Guide
  Forums Index
      » Tutorial and Guides Forums
        » » Learn How To Prevent HTMLTags into Forms PHP Javascript SSI Tutorial Guide



Learn How To Prevent HTMLTags Into Forms PHP Javascript SSI Tutorial Guide
Post Description:
Post Tags: learn, how, to, prevent, htmltags, into, forms, php, javascript, ssi, tutorial, guide, tutorial, guides, howto, teach, learn, computer, programming, support
This Post Has Been Viewed 905 Times Since Mon Jan 15, 2007 6:25 am Posted By marvin with 0 replies
Learn How To Prevent HTMLTags Into Forms PHP Javascript SSI Tutorial Guide
once way to get infromation from users is throught the use of form. When receiving input from user you must be ready for a number of visitors who will try to enter nonses, bougus or fake information values either because they are not awared or because of malice. for example, if your form ask a number, make sure the number -1 is not allowed. PHP has a very useful function you can use to prohibit or disallow HTML tags from. the htmlspecialchars() is useful when you have forms in forums or guestbooks for example, there are spammers who pray on these type of form only to put malicious code into your pages.

one way to restric html or javascript tags in php, is by detecting if html tags are being entered. this would be a example: if i input the following into a form: <a href="mydomain.com">bad link</a>, i could delete this part of the submit with the folllowing code:


     Code:
$input = ereg_replace("<.*>","",$input);


with the sample code above, you removed all the html or php or javascript tags that a malicious person would have entered.


Leave Your Comments






Share
URL:
You can use this HTML code to put it on your website to show your friends this wallpaper. Use this code on your profile like myspace, friendster, Facebook or others. Just Copy and Paste it in your HTML on your websites



Fourms BBCODE:
BBCODE is use on forums. You can put this code on all your BBCODE enabled forums like PhpBB, vBulletin® and others. Just Copy and Paste this code on your Posts and Replies on your forums





Comments and replies About Learn How To Prevent HTMLTags Into Forms PHP Javascript SSI Tutorial Guide




(0) Comments