Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- if($a == "")
- {
- ?>
- <form action="" method="post">
- Username: <input type="text" name="username" size="30"/><br>
- Password: <input type="password" name="password" size="30"/><br>
- E-mail: <input type="password" name="email" size="50"/><br>
- <input type="hidden" name="a" value="1"><br>
- <input type="submit" />
- </form>
- <?php
- }
- else
- {
- $username = $_POST['username'];
- $password = $_POST['password'];
- $email = $_POST['email'];
- //Fill in database details here
- $dbhost = "";
- $dbuser = "";
- $dbpass = "";
- $dbname = "";
- mysql_connect ($dbhost, $dbuser, $dbpass)or die("ERROR: Could not connect: ".mysql_error());
- mysql_select_db($dbname) or die(mysql_error());
- mysql_query("INSERT INTO users (username, password, email)
- VALUES ('$postname', '$username', '$password', '$email')");
- echo "Successfully Joined!";
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement