Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- require_once 'config.php';
- if(isset($_GET['action'])) {
- switch($_GET['action']) {
- case 'register':
- $username=$_POST['account'];
- $password=$_POST['password'];
- $conpassword=$_POST['conpassword'];
- $email=$_POST['email'];
- $conemail=$_POST['conemail'];
- $username = stripslashes($username);
- $password = stripslashes($password);
- $conpassword = stripslashes($conpassword);
- $email = stripslashes($email);
- $conemail = stripslashes($conemail);
- $username = mysql_real_escape_string($username);
- $password = mysql_real_escape_string($password);
- $conpassword = mysql_real_escape_string($conpassword);
- $email = mysql_real_escape_string($email);
- $conemail = mysql_real_escape_string($conemail);
- if($password==$conpassword && $email==$conemail){
- $sql = mysql_query("SELECT * FROM login WHERE account='$username'");
- if (mysql_num_rows($sql) == 1) {
- mysql_select_db($SQL_DATABASE,$SQL_CON) or die (mysql_error());
- $sql2="INSERT INTO login (account, password, email) VALUES ('$username', '$password', '$email')";
- $result=mysql_query($sql2);
- }else{
- echo '<center><FONT COLOR="#737373">Your account name is already in use, Please choose a new one.</FONT></center>';
- }
- }else{
- echo '<center><FONT COLOR="#737373">Your email and or password does not match its confirmation, Please check again.</FONT></center>';
- }
- }
- break;
- }
- }
- echo '<html>
- <head>
- <title>CRL - Community Rage List</title>
- <link rel="stylesheet" type="text/css" href="style.css" media="all" />
- </head>
- <body>
- <center>
- <table class="border" border="0">
- <th class="head" colspan="8">Register</th></table>
- <fieldset class="row">
- <form action="?action=register" method="post">
- Username: <input type="text" name="account" class="input3" /><br><br>
- Password: <input type="password" name="password" class="input3" /><br><br>
- Confirm Password: <input type="password" name="conpassword" class="input3" /><br><br>
- Email: <input type="text" name="email" class="input3" /><br><br>
- Confirm Email: <input type="text" name="conemail" class="input3" /><br><br>
- <input type="submit" value="Register" class="input3" />
- </form>
- </fieldset>
- </center>
- </body>
- </html>';
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement