The code basically looks as follow. Thanks for looking.
<?php
ob_start(); //begin buffering the output
$problem = FALSE;
if (empty ($FirstName)) {
$problem = TRUE;
echo '<p>Please enter your first name.</p>';
}
if (empty ($LastName)) {
$problem = TRUE;
echo '<p>Please enter your last name.</p>';
}
if (empty ($EmailAddress)) {
$problem = TRUE;
echo '<p>Please enter your email address. This is one of the ways that we may communicate with you.</p>';
}
if (empty ($Password)) {
$problem = TRUE;
echo '<p>Please enter a password</p>';
}
if ($Password != $VerifyPassword) {
$problem = TRUE;
echo '<p>Please ensure that both passwords fields match. You must enter the same text in both boxes to be able to proceed. This is necessary to prevent the wrong password from accidently being stored on file.</P>';
}
if (empty ($Address)) {
$problem = TRUE;
echo '<p>Please enter address.</p>';
}
if (empty ($City)) {
$problem = TRUE;
echo '<p>Please enter your last name.</p>';
}
if (empty ($PostalCode)) {
$problem = TRUE;
echo '<p>Please enter your postal code.</p>';
}
if (empty ($phone)) {
$problem = TRUE;
echo '<p>Please enter your phone number.</p>';
}
if (!$problem) {
echo '<p>Thank you, registration is complete. One moment please while we log you in...</P>';
mysql_connect("server","info","password") or die("Unable to connect to SQL server - Please try again later.");
mysql_selectdb('database');
$query = "INSERT INTO users (cust_number, first_name, last_name, address1, address2, city, prov, postal_code, email, phone, customer_level, mail_list, password, date) VALUES (0, '$FirstName', '$LastName', '$Address', '$Address1', '$City', '$Province', '$PostalCode', '$EmailAddress', '$phone', 'A', '$MailList', '$Password', NOW())";
mysql_close();
header('Refresh: 3; url=ourloginpage);
} else {
echo ('<p>There is a problem with the information that has been entered. Please press the back button and try again.</p>');}
?>