Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public function setUser(User $user){
- $login = $user->Login();
- $password = $user->Password();
- $data = '';
- //$data = $this->getUser($login);
- if(true){
- $sql = 'INSERT INTO users (login, password) VALUES (:login, :password)';
- $query = $this->DB()->prepare($sql);
- try{
- $query->execute(array(':login' => $login, ':password'=> $password));
- }catch (Exception $e) {
- echo 'Exception reçue : ', $e->getMessage(), "\n";
- }
- return true;
- }else{
- return false;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement