Re: script to check subscription

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Floortje

    Re: script to check subscription

    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($emai ltocheck) {

    $sql = "SELECT id FROM Table WHERE email = '".$emailtochec k."' ";

    // change to your favourite db method
    if(db::query($s ql)){

    return true;

    }
    return false;
    }
Working...