daily pastebin goal
12%
SHARE
TWEET

Untitled

a guest Jun 13th, 2018 56 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. // Formularz
  3. if(isset($_POST['submitted']))
  4. {
  5.     // Prepare
  6.     $query = $db->prepare('INSERT INTO user (username, email, haslo) VALUES (:username, :email, :haslo)');
  7.    
  8.     // Bind
  9.     $query->bindValue(':username', htmlspecialchars($_POST['username']), PDO::PARAM_STR);
  10.     $query->bindValue(':email', htmlspecialchars($_POST['email']), PDO::PARAM_STR);
  11.     $query->bindValue(':haslo', htmlspecialchars($_POST['haslo']), PDO::PARAM_STR);
  12.    
  13.     // Exec
  14.     $query->execute();
  15.    
  16.     // Print
  17.     echo 'Zostałeś zarejestrowany!';
  18. }
  19.  
  20.  
  21.  
  22. // Przypisanie
  23. $tpl->assign('user', $user);
  24.  
  25. // Parse
  26. $tpl->parse('register_show.tpl');
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top