Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- include "connect.php";
- $user=$_POST['username'];
- $password=$_POST['password'];
- $confirm=$_POST['confirm'];
- $user=strip_tags($user);
- if ($password==$confirm)
- {
- $isuser="SELECT * from USER TABLE where username='$user'"; //CHECK IF THE NAME ALREADY EXISTS YO!
- $isuser2=mysql_query($isuser) or die("Could not query users table" . mysql_error());
- $isuser3=mysql_fetch_array($isuser2);
- if(!$_POST['password'] || !$_POST['confirm'])
- {
- print "You did not enter a password faggot..";
- }
- else if($isuser3 || strlen($user)>15 || strlen($user)<1)
- {
- print "Either, that user exists or you entered a name below 1 character or above 15.";
- }
- else
- {
- $password=md5($password);
- $SQL = "INSERT into USER TABLE(username, password, OTHER FIELD NAMES) VALUES ('$user','$password', 'OTHER VALUES')";
- mysql_query($SQL) or die("Couldn't register" . mysql_error());
- print "Rocketttttt Success. You can now buy an amazing CD! <br />";
- print "Click here to <a href='login.php'>Login</a>";
- }
- }
- else
- {
- print "Rockettttttt Wrong, your passwords didn't match or you did not enter a password.";
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement