By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,751 Members | 1,158 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,751 IT Pros & Developers. It's quick & easy.

Re: script to check subscription

P: n/a
chadlupkes wrote:
I'm creating a series of forms for people to contact their elected
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:
I personally would not check a database by email to see if a user exists
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;
}
Sep 11 '08 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.