Advertisement
Guest User

Untitled

a guest
Feb 3rd, 2014
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. class checkme{
  2. function CheckEmail(){
  3. $dbh = new Database(); # Open database
  4. $dbh->setAttribute(PDO::ATTR_EMULATE_PREPARES, false); # Small SQL injection security
  5. $stmt = $dbh->prepare('SELECT email FROM members WHERE email=?'); # Check if email exists
  6. $stmt->bindParam(1, $email, PDO::PARAM_INT);
  7. $stmt->execute();
  8. $rows = $stmt->fetchAll(PDO::FETCH_ASSOC);
  9. }
  10. }
  11.  
  12. # Call with :
  13.  
  14. $WebT = new checkme();
  15. $WebT->CheckEmail ();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement