fullyloaded Posted March 7, 2007 Share Posted March 7, 2007 hi i was wondering if there was anyway to change this bit of code so it will check and see if a email address is in the database i want to take out the member_id part and have it look for only the email address } elseif(!$allowed_email[$ld['email']]) { $this->dbu->query("select member_id from ban_emails where email='".$ld['email']."'"); if($this->dbu->move_next()) { $ld['error'].="This email address is banned."."<br>"; $is_ok=false; } } and here is the sql code im trying to get to work but dont know if its right -- -- Table structure for table `ban_emails` -- CREATE TABLE `ban_emails` ( `email` varchar(255) NOT NULL default '', ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; -- -- Dumping data for table `ban_emails` -- INSERT INTO `ban_emails` VALUES ([email protected]); Link to comment https://forums.phpfreaks.com/topic/41560-email-and-database/ Share on other sites More sharing options...
jeremywesselman Posted March 7, 2007 Share Posted March 7, 2007 Sounds like all you need to do is change the column name in your query: $this->dbu->query("select email from ban_emails where email='".$ld['email']."'"); Jeremy Link to comment https://forums.phpfreaks.com/topic/41560-email-and-database/#findComment-201482 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.