prepare($request); $pdo->execute(array($mail, $promo, $pass)); } function validate_register($mail, $login) { $request = "SELECT * FROM AIIDE_INSCRIPTIONS WHERE MAIL=?"; $pdo = $dbh->prepare($request); $pdo->execute(array($mail)); $user = $pdo->fetch(); if($user) { include_once "roles.php"; $request_insert = "INSERT INTO AIIDE_USERS VALUES(?, ?, ?, ?, ?)"; $request_delete = "DELETE FROM AIIDE_INSCRIPTIONS WHERE MAIL=?"; $insert = $dbh->prepare($request_insert); $insert->execute(array($user->MAIL, $user->LOGIN, $user->PROMO, $roles["std"], $user->PASSWD)); $delete = $dbh->prepare($request_delete); $delete->execute(array($user->mail)); } } // A compléter function reject_register($mail) { } ?>