Created
January 23, 2026 11:53
-
-
Save maxixo/465cd94b90c97a72df3dd6c4e9712345 to your computer and use it in GitHub Desktop.
login registration with php
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| $conn = new mysqli("localhost", "root", "", "user_system"); | |
| $username = $_POST['username']; | |
| $email = $_POST['email']; | |
| $password = password_hash($_POST['password'], PASSWORD_DEFAULT); | |
| $sql = "INSERT INTO users (username, email, password) VALUES (?, ?, ?)"; | |
| $stmt = $conn->prepare($sql); | |
| $stmt->bind_param("sss", $username, $email, $password); | |
| $stmt->execute(); | |
| echo "Registration Susscessful!"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1"> | |
| <title>Registration</title> | |
| </head> | |
| <body> | |
| <form action="register.php" method="POST"> | |
| <input type="text" name="username" placeholder="username" required> | |
| <input type="email" name="email" placeholder="email" required> | |
| <input type="password" name="password" placeholder="password" required> | |
| <button type="submit">Register</button> | |
| </form> | |
| </body> | |
| </html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment