p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


  Return to Index  

beginning_php thread: Re: htmlspecialchars-THANKS A LOT!


Message #1 by "Avegael Guarin" <go_emile@a...> on Wed, 09 Oct 2002 10:52:49 -0500
Periklis Paschidis... Sorry that's the name.! GREAT! thanks a lot.
----- Original Message -----
From: "Periklis Paschidis" <perikpas@o...>
Date: Wed, 9 Oct 2002 14:00:53
To: "beginning php" <beginning_php@p...>
Subject: [beginning_php] Re: htmlspecialchars

its simple. You use it after you take the variables.

example

file1.html
-----------

<form action="file2.php" method="get">
<input type="text" name="UserName">
<input type="submit">
</form>


Now!...

file2.php
-----------

$UserName = HTMLSpecialChars($UserName);
echo "Your name is: $UserName";


So.. if the user has input html code with is name...
example: <b>John</b>

the <b></b> tags will be removed and the name will be seen o screen in 
normal text.

simple is'n it? :-)

I hope i help you.

-- 
__________________________________________________________

Sign-up for your own FREE Personalized E-mail at Mail.com

http://www.mail.com/?sr=signup



"Free price comparison tool gives you the best prices and cash back!"

http://www.bestbuyfinder.com/download.htm



  Return to Index