View Full Version : PHP Help
LacVan
10-05-2002, 04:53 PM
Co' bro/sis na`o ra`nh ve^` PHP hong giu'p LV vo*'i . LV muo^'n bie^'t ca'ch eliminate HTML Tags in form elements using PHP a' . Bro/sis na`o bie^'t chi? LV du`m he'n .. thanks!! :(
yeudoi
10-21-2002, 06:58 AM
<html>
<body>
<?
echo 'testing';
?>
</body>
</html>
========
Can I have a look at the program you wrote?
LacVan
11-15-2002, 07:55 AM
hmmmm .. LV chu*a co' wrote program .. chi? la` LV muo^'n bie^'t in general, ne^'u nhu* mi`nh vie^'t mo^.t ca'i HTML form ro^`i thi` parse no' dzi' PHP .. tru*o*'c khi send form fields to MySQL database, la`m ca'ch na`o dde^? mi`nh take out ta^'t ca? HTML tag in form fields ? Meaning that disable nhu*~ng ca'i tag ddo', just in case co' ngu*o*`i muo^'n du`m nhu*~ng ca'i tag ddo' do funny things to our system ?
Nghe thi` ho*i confusing .. hong bie^'t no'i di. mi' bro hie^?u hong :(
Basically LV muo^'n disable all HTML tag in form fields .
hmm...i think you should look at 3 functions from php.
htmlspecialchars - http://www.php.net/manual/en/function.htmlspecialchars.php
htmlentities - http://www.php.net/manual/en/function.htmlentities.php
strip_tags - http://www.php.net/manual/en/function.strip-tags.php
i think the best 1 you are looking at is the strip_tags function.
there isn't a specific 1 that you can do...you have to write your own function to do, which is not that hard :)
yeudoi
11-17-2002, 07:55 AM
You can write an if statement to disable all PHP tags.
lol...that would be crazy..why not just write a simple function that do that ;)...;).future just parse over to the function.
LacVan
11-17-2002, 07:50 PM
hihiih .. thanks alll :)
vBulletin® v3.8.4, Copyright ©2000-2010, Jelsoft Enterprises Ltd.