Jump to content

html form php security


daydreamer

Recommended Posts

Unless you're echoing the form value, you shouldn't worry about people running PHP codes.

 

If you for some reason plan on echoing one of the form values, you could try something like this:

 

<?php

$message = $_POST['your_form_field'];
$message = strip_tags(htmlspecialchars($message, ENT_QUOTES));

?>

 

This also protects you from JavaScript hacking like Masna wrote.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.