Help with this code please? don't think its something major

[php]Parse error: syntax error, unexpected ‘;’ on line 53[/php]

[php]<?php

include “confff.php”;

// test to see if username is alpha- numeric

$test = $_POST[“username”];

if (!preg_match(’/[^A-Za-z0-9]/i’, $test)) { //check to see if username has used alpha numeric

$query = “SELECT * FROM users WHERE username = ‘$_POST[username]’”; // check to see username is already in the database.
$result = mysql_query($query); // gets the result
$num = mysql_num_rows($result); // checks the rows. if its in 0 rows then username hasnt been used before meaning the if statement will be true for username.

if ($num == 0) { // If username has no alpha numeric or hasnt been used before then proceed.

}

else {

header(“Location:nameinuse.html”); // ELSE redirect to nameinuse.html

}

}

else {

header(“Location:invalidname.html”); // ELSE redirect to invalidname.html
}

//test for duplicate email

$query2 = “SELECT * FROM users WHERE email = ‘$_POST[email]’”;
$result2 = mysql_query($query2);
$num2 = mysql_num_rows($result2);

if ($num2 == 0) {

}

if (($_POST[“pass”] == $_POST[“pass2”]) && ($_POST[“email”] == $_POST[“email2”];

$confirm_code=md5(uniqid(rand()));// generate random confirmation code

$name = strip_tags($_POST[“username”]);
$email = strip_tags($_POST[“email”]); //get rid of all html from hackers
$pass = strip_tags($_POST[“pass”]);

$sql = “INSERT INTO temp SET code = ‘$confirm_code’, username = ‘$name’”; // insert data into database
$result = mysql_query($sql)

if($result) {

$message = “Your confirmation link \r\n”;
$message .= “Click on this link to activate your account”;
$message .= “http://www.google.co.uk”;

$sentmail=mail("$email", “Register Conformation”, “message”;
header(“location:thankyou.html”);
}

else {

header(“Location:invalidemail.html”); //email already in use.
}

else

{
echo “Your email has not been found in our database.”;

if($sentmail) { //if email sent sucessfully

echo “Your confirmation link has been sent to your email address.”;

}

else {

echo “Cannot send Confirmation link to your e-mail address”;

}

}

?>[/php]

Can we get a little more info on what you need help with?

Sponsor our Newsletter | Privacy Policy | Terms of Service