Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $servername = "localhost";
- $name = "root";
- $pass = "";
- $database = "register";
- $con = mysqli_connect($servername,$name,$pass,$database);
- $username = mysqli_real_escape_string($con, $_POST['username']);
- $email = mysqli_real_escape_string($con, $_POST['email']);
- $password = mysqli_real_escape_string($con, $_POST['password']);
- $sql = "INSERT INTO users(username,email,password) VALUES('$username', '$email', '$password')";
- ?>
- <html>
- <body>
- <div class="form">
- <h1>Registration</h1>
- <form name="registration" action="insert.php" method="post">
- <input type="text" name="username" id="username" placeholder="Username" required />
- <input type="email" name="email" id="email" placeholder="Email" required />
- <input type="password" name="password" id="password" placeholder="Password" required />
- <input type="submit" name="submit" value="Register" />
- </form>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement