Ok, so i have figured out how to display a message. Basically what I did was in the //append the username to the redirect page section, I added a variable:
if (substr_count($MM_dupKeyRedirect,"?") >=1) $MM_qsChar = "&";
$MM_dupKeyRedirect = $MM_dupKeyRedirect . $MM_qsChar ."requsername=".$loginUsername . "&exists=1";
header ("Location: $MM_dupKeyRedirect");
The variable I added is the &exists=1. I then placed this code:
if (isset($_GET['exists'])) {
$exists = $_GET['exists'];
}
if ($exists == 1) {
echo "Hello World";
}
So I will now be able to give the visitor a message with further instruction if they enter an email address that is already in the database.
Now, my next question is very much related. How do I bind the text fields? Right now, if the user is redirected due to the email address, all the data they entered into the form text boxes disappears. I tried binding the form data to the fields with no luck. Do I HAVE to use the URL to pass variables or is their another way? If I can pass the variables to the Header (Location, then I can solve these problems I am having.