Jump to content

email and database


fullyloaded

Recommended Posts

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.