Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- include("config.php');
- session_start();
- ?>
- <html>
- <head>
- <link rel="stylesheet" href="index.css" type="text/css">
- </head>
- <body>
- <center>
- <form method="post" action="">
- Gebruikersnaam: <input type="text" name="1"><br>
- Wachtwoord: <input type="password" name="2"><br>
- <input type="submit" name="submit" value="Registreer!">
- </form>
- </center>
- <?php
- if (isset($_POST["submit"])) {
- $one = $_POST["1"];
- $two = $_POST["2"];
- $a = $db->prepare("INSERT INTO Users SET Username=?, Password=?");
- $a->execute(array($one, $two));
- if ($a) {
- echo "<script>alert('Gelukt!');</script>";
- $_SESSION['Users'] = $one;
- } else {
- echo "<script>alert('Niet gelukt!');</script>";
- }
- }
- ?>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement