<?php
if(isset($_POST['Submit']))
{
//Email information
$to = "email@email.net";
$subject = "New Services Web Application";
$from = "email@anotheremail.net";
$headers = "From: $from";
//Email content from the signup.php form
$regperiod = $_POST['regperiod'];
$domain_name = $_POST['domain_name'];
$topleveldomain = $_POST['topleveldomain'];
$organization = $_POST['organization'];
$id_number = $_POST['id_number'];
$first_name = $_POST['first_name'];
$last_name = $_POST['last_name'];
$email = $_POST['email'];
$contact_number = $_POST['contact_number'];
$fax_number = $_POST['fax_number'];
$address = $_POST['address'];
$city = $_POST['city'];
$postalcode = $_POST['postalcode'];
$province = $_POST['province'];
$other_province = $_POST['other_province'];
$country = $_POST['country'];
$password1 = $_POST['password1'];
$password2 = $_POST['password2'];
//Message content
$message1 = "Good day, please assist in the processing of the following new application \n
Registration period: $regperiod \n
Domain name: www.$domain_name.$topleveldomain \n
Organization: $organization \n
Id Number: $id_number \n
First Name: $first_name \n
Last Name: $last_name \n
Email Address: $email \n
Contact Number: $contact_number \n
Fax Number: $fax_number \n
Address: $address \n
City: $city \n
Postal Code: $postalcode \n
Province: $province \n
Other Province: $other_province \n
Country: $country \n
Password: $password1 \n
Confirn Password: $password2";
mail($to,$subject,$headers,$message1);
echo "Mail Sent. Click <a href='index.php'>here</a> to return to home page";
}
else
{
echo "Sorry there was a problem delivering your email please try again";
}
//End of new applications script
?>
I need some serious help with the validation of the script above - as you can see, the user's input is not being validated. Please assist with either PHP or JavaScript validation.
I will post you a box of chocolates or Mint flavored gums...