query("SELECT * FROM Users WHERE EmailAddress = '$fld_email'"); $goahead = true; if ($db->recordcount() > 0){ $dateofbirth = $fld_day."/".$fld_month."/".$fld_year; $sql2 = "UPDATE Users SET Title = '".$fld_title."', Password = '".$fld_password."', Forename = '".$fld_firstname."', Surname = '".$fld_surname."', EmailAddress = '".$fld_email."', HowHeard = '".$fld_howheard."', IfOther = '".$fld_ifother."', DateOfBirth = '".$dateofbirth."', Competition = 'YES', Newsletter = '".$fld_newsletter."' WHERE EmailAddress = '".$fld_email."'"; $db2->query($sql2); $message = "Your registration has been accepted.


"; $goahead = false; }; /* if (!isvalidemail($fld_email)){ $message = "The email address you entered is not valid.
"; $goahead = false; };*/ if ($goahead){ $dateofbirth = $fld_day."/".$fld_month."/".$fld_year; $sql2 = "INSERT INTO Users (Title, Password, Forename, Surname, EmailAddress, HowHeard, IfOther, DateOfBirth, Newsletter, Enabled) VALUES ". "('$fld_title','$fld_password','$fld_firstname','$fld_surname','$fld_email','$fld_howheard','$fld_ifother','$dateofbirth','$fld_newsletter','YES')"; $db2->query($sql2); $message = " Registration Accepted
"; unset($fld_title); unset($fld_firstname); unset($fld_surname); unset($fld_email); unset($fld_password); }; $content = " $message
$t_title
Register for the Funky Town Grooves email news bulletin to be kept up to date with the latest news and events.
"; } else { $content = " $message
Register for the FunkyTownGrooves email news bulletin to be kept up to date with the latest news and events.

Title:
First Name:
Surname:
Email Address:
Date of Birth: / / (DD/MM/YYYY)
Password:
Confirm Password:
How did you hear about Funky Town?
If Other :
Would you like to receive our newsletter?


"; }; $bodystring = <<$s_name $content BODY; include ("template.php"); ?>