Advertisement
Guest User

Untitled

a guest
Jul 27th, 2017
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.83 KB | None | 0 0
  1. /****************
  2. SOLUTION 1
  3. ****************/
  4.  
  5. $timestamp = time();
  6.  
  7.         $REQinscription = $CNCTacc->prepare('INSERT INTO player_accounts(username, password, mail, question, reponse, gmlevel, banned, points, timestamp, IDSCadeaux) VALUES(:account, :password, :email, :question, :reponse, :gmlevel, :banned, :points, :timestamp, :IDSCadeaux)');
  8.         $REQinscription->execute(array(
  9.                                         'account' => $account,
  10.                                         'password' => MD5($password),
  11.                                         'email' => $email,
  12.                                         'question' => $question,
  13.                                         'reponse' => $reponse,
  14.                                         'gmlevel' => 0,
  15.                                         'banned' => 0,
  16.                                         'points' => 0,
  17.                                         'timestamp' => $timestamp,
  18.                                         'IDSCadeaux' => 0));
  19.  
  20. /****************
  21. SOLUTION 2
  22. ****************/
  23.    
  24.         $REQinscription = $CNCTacc->prepare("INSERT INTO player_accounts VALUES ('' , :account, :password, :email, :question, :reponse, :null, :null, :null, :null, 0, 0, 0, " . time() .", :null)");
  25.    
  26.         $REQinscription->bindValue(':account', $account, PDO::PARAM_STR);
  27.         $REQinscription->bindValue(':password', MD5($password), PDO::PARAM_STR);
  28.         $REQinscription->bindValue(':email', $email, PDO::PARAM_STR);
  29.         $REQinscription->bindValue(':question', $question, PDO::PARAM_STR);
  30.         $REQinscription->bindValue(':reponse', $reponse, PDO::PARAM_STR);  
  31.         $REQinscription->bindValue(':null', '', PDO::PARAM_NULL);      
  32.         $REQinscription->bindValue(':zero', $zero, PDO::PARAM_INT);
  33.  
  34. /****************
  35. SOLUTION 3
  36. ****************/
  37.        
  38.         $REQinscription = $CNCTacc->prepare("INSERT INTO player_accounts VALUES ('' , :account, :password, :email, :question, :reponse, '', '', '', '', 0, 0, 0, " . time() .", '')");
  39.        
  40.         $REQinscription->execute(array('account' => $account,
  41.                                         'password' => MD5($password),
  42.                                         'email' => $email,
  43.                                         'question' => $question,
  44.                                         'reponse' => $reponse));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement