Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class checkme{
- function CheckEmail(){
- $dbh = new Database(); # Open database
- $dbh->setAttribute(PDO::ATTR_EMULATE_PREPARES, false); # Small SQL injection security
- $stmt = $dbh->prepare('SELECT email FROM members WHERE email=?'); # Check if email exists
- $stmt->bindParam(1, $email, PDO::PARAM_INT);
- $stmt->execute();
- $rows = $stmt->fetchAll(PDO::FETCH_ASSOC);
- }
- }
- # Call with :
- $WebT = new checkme();
- $WebT->CheckEmail ();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement