Posted by Tim Van Wassenhove on 10/07/20 11:36
On 2006-01-06, Erwin Moller <since_humans_read_this_I_am_spammed_too_much@spamyourself.com> wrote:
> $firstname=$_POST["firstname"];
> $LastName=$_POST["LastName"];
> $email=$_POST["email"];
> $Comments=$_POST["Comments"];
I've got the feeling that tutorials should spend more attention to cleaning
input and output so the student can't shoot himself in the foot.
$html = array();
$html['firstname'] = htmlentities($_POST['firstname'], 'UTF-8');
....
echo "Your firstname is: {$html['firstname']} <br/>";
...
--
Met vriendelijke groeten,
Tim Van Wassenhove <http://timvw.madoka.be>
Navigation:
[Reply to this message]
|