Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- // Formularz
- if(isset($_POST['submitted']))
- {
- // Prepare
- $query = $db->prepare('INSERT INTO user (username, email, haslo) VALUES (:username, :email, :haslo)');
- // Bind
- $query->bindValue(':username', htmlspecialchars($_POST['username']), PDO::PARAM_STR);
- $query->bindValue(':email', htmlspecialchars($_POST['email']), PDO::PARAM_STR);
- $query->bindValue(':haslo', htmlspecialchars($_POST['haslo']), PDO::PARAM_STR);
- // Exec
- $query->execute();
- // Print
- echo 'Zostałeś zarejestrowany!';
- }
- // Przypisanie
- $tpl->assign('user', $user);
- // Parse
- $tpl->parse('register_show.tpl');
Add Comment
Please, Sign In to add comment