I'm creating a series of forms for people to contact their electedI personally would not check a database by email to see if a user exists
officials at various levels of government. I'm trying to create a way
to confirm that the person using the form is one of our members, and
I'm having trouble with the function that is supposed to pull the
registered email addresses and check the email entered against that
list to make sure that someone is registered.
I'm not sure what script you'll need to see, but here's the test
function:
but here you go ...
function testEmail($emailtocheck) {
$sql = "SELECT id FROM Table WHERE email = '".$emailtocheck."' ";
// change to your favourite db method
if(db::query($sql)){
return true;
}
return false;
}