Tuesday, February 23, 2016

How to check email id use more than five times from database in php.

In this tutorial i explain you the user register only 5 times for one email id .

$sql="select count(user_email) as email_count from users where user_email='$email'";// where $email is given by the user input.
//now check the count
mysql_query($sql);

if($email_count>=5)
{
echo 'You use this email ID more than five times! please try for another email Id!';
}else
{
$sql ="insert into users(column_name) values('$values','',)";
mysql_query($sql);
}

No comments:

Post a Comment

Featured Post

What is JavaScript? What is the role of JavaScript engine?

  The JavaScript is a Programming language that is used for converting static web pages to interactive and dynamic web pages. A JavaScript e...