I have a code which returns an error message however I am trying add a ‘tag’ to it.
$query = mysql_query("SELECT * FROM users WHERE email = '". $registerEmail ."' OR email = '". $email ."'");
if (mysql_num_rows($query) > 0)
{
echo 'Email Address is Already In Use. Please Retrieve Your Password.';
}
I am trying to add a ‘tag’ so that I can place the error message in a certain place on the page.
$query = mysql_query("SELECT * FROM users WHERE email = '". $registerEmail ."' OR email = '". $email ."'");
if (mysql_num_rows($query) > 0)
{
$success['emailduplicate'] = 'Email Address is Already In Use. Please Retrieve Your Password.';
}
Im trying to add a tag “emailduplicate” so that I can echo the error message in a DIV.
The top piece of code echoes the error message in the very top left of the page. I am trying to move it to a specific place on the page. I am trying to add a ‘tag’ called “emailduplicate”.
So I can display the error message where ever I place the following code:
It seems like you’re simply wanting to know how to use CSS to place the div with the class “registerinputerrors” at a specific place rather than where it appears in the html. If so, this isn’t really a coding issue. I’ll wait for your response before requesting that the thread be moved.
Thanks, but I dont know how to apply ‘Email Address is Already In Use. Please Retrieve Your Password.’ to $message.
$query = mysql_query("SELECT * FROM users WHERE email = '". $registerEmail ."' OR email = '". $email ."'");
if (mysql_num_rows($query) > 0)
{
echo 'Email Address is Already In Use. Please Retrieve Your Password.';
}
The problem I have now is that the email is still submitted to the database. Is it possible to stop the email from being submitted once it reads that the email address is already in the database?