PHP Code:<?php
//The Variables
$name = $_POST["name"];
$password = $_POST["password"];
$email - $_POST["email"];
$age = $_POST["age"];
$submit = $_POST["submit"];
//The IFs
if ($submit != "")
{
if ($name == "")
{
die ("Whoops! You didn't enter a username. You need that if you want to login!");
}
if ($password == "")
{
die ("Whoops! You didn't enter a password. You need this to login to your account as well as security for your account!");
}
if ($email == "")
{
die ("Whoops! You didn't enter an email. You need this to receive news and updates for the usersystem, as well as to verify your identity.");
}
if ($age == "")
{
die ("Whoops! You didn't enter your age. We need this to verify you are old enough to register!");
}
echo "Heya, $name - Welcome to $site. The details you used to sign up are as follows:<br>
Name: $name<br>
Email: $email<br>
Age: $age<br>
<br>
If the details are incorrect, use the back button and try again. If they are correct, please continue to the installer.";
exit;
}
// The HTML
echo "<form action=\"register2.php\" method=\"post\">
Username: <input type=\"text\" name\"name\"><br>
Password: <input type=\"text\" name\"password\"><br>
Email: <input type=\"text\" name=\"email\"><br>
Age: <input type=\"text\" name=\"age\"><br>
<input type=\"submit\" name=\"submit\" value=\"Submit\">
</form>";
?>


Reply With Quote



