Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- // register.php
- include("./Header.php"); // make Header.php include your mysql database connect
- if(!$_POST['submit']){
- echo "<form method=\"post\">";
- echo "Username <input type=\"text\" name=\"username\"> <br>";
- echo "Password <input type=\"password\" name=\"password\"><br>";
- echo "<input type=\"submit\" name=\"submit\">";
- }else{
- $username = $_POST['username'];
- $password = $_POST['password'];
- if(!$username){
- die("You need to specify a username.");
- }
- if(!$password){
- die("You need to specify a password.");
- }
- // mysql insert here
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement