<?php
if($_POST['submit']){
// this strips out any unwanted html tags and turns it into a string
if (!isset($_POST['fname']) && $_POST['fname']!="")#_#_#_#_#_#_#_# New line
{
$_POST['fname'] = filter_var($_POST['fname'], FILTER_SANITIZE_STRING);
//if the text field is empty put the error in the array
if ($_POST['fname'] == "") {
$errors[] = "Please enter your first name";
}
}
else
{
$errors[] = "Please enter your first name"; #_#_#_#_#_#_#_# New line
}Add a code snippet to your website: www.paste.org