include_once 'header.php';
include 'checkemail.js';
include 'checkfname.js';
include 'checkpass.js';
include 'checklname.js';
include 'checkconfirm.js';
echo <<<_END
<link rel="stylesheet" type="text/css" href="styles.css" />
<h3>SIGN UP FOR FREE</h3>
_END;
{
function isValidEmail($Email){
$pattern = "^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$";
if ( $Email == "" || $pass == "" ||$firstname == ""|| $lastname == ""|| $passconfirm == "" )
{
$error = "<font color='red'><h3>You have to enter all fields!</font><br /></h3>";
}
else
{
$query = "SELECT * FROM members WHERE email='$Email'";
if (mysql_num_rows(queryMysql($query)))
{
$error = "<font color='red'>That Email already exists in our database!</font>";
}
else
{
{
if (isValidEmail($_POST['email'])){
echo "";
}else
{
die ('<br><br><br><br><div class="fieldContainer">Invalid Email! Click <a href="http://localhost/PHP%20lesson/signup1test.php">HERE</a> :(</div>');
}
if ($_POST['pass'] == $_POST['passconfirm'])
{
}
else
{
die ('<font color="red"><br><br><br><br><div class="fieldContainer">Your Passwords did NOT match please Click <a href="http://localhost/PHP%20lesson/signup1test.php">HERE</a> to try again</font></div>');
}
$query = "INSERT INTO members VALUES('id','$firstname','$lastname','$Email','$pass')";
queryMysql($query);
die("<h4><br><br><br><h2><div class='fieldContainer'>CONGRATS!</h2><br>Before you can login , check your email for a confermation email!</div>");
}
What you posted looked javascript values. You will have to build another some code to accept $_GET requests if you want this to work. You also will need to use the XMLrequest object or an AJAX framework.