web_master Posted March 22, 2008 Share Posted March 22, 2008 Hi How can a check is email exist in dBase. I want to do this: <?php if($request['e_mail'] == $_POST['e_mail']) { $query_return = mysql_query(" INSERT INTO `users` ( `e_mail` ) VALUES ( ' " . $_POST['e_mail'] . " ' "); } ?> thnx in advance! Link to comment https://forums.phpfreaks.com/topic/97356-if-email-exist-in-dbase/ Share on other sites More sharing options...
Orio Posted March 22, 2008 Share Posted March 22, 2008 <?php $sql = "SELECT * FROM `users` WHERE e_mail = '$email' LIMIT 1"; $result = mysql_quet($sql); if(mysql_num_rows($result) == 1) echo "Email is taken"; ?> Orio. Link to comment https://forums.phpfreaks.com/topic/97356-if-email-exist-in-dbase/#findComment-498155 Share on other sites More sharing options...
web_master Posted March 22, 2008 Author Share Posted March 22, 2008 thnxs Orio! Link to comment https://forums.phpfreaks.com/topic/97356-if-email-exist-in-dbase/#findComment-498179 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.