Advertisement
Guest User

Untitled

a guest
Aug 17th, 2017
167
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.95 KB | None | 0 0
  1. <?php
  2. require_once 'config.php';
  3. if(isset($_GET['action'])) {
  4.     switch($_GET['action']) {
  5.         case 'register':
  6.         $username=$_POST['account'];
  7.         $password=$_POST['password'];
  8.         $conpassword=$_POST['conpassword'];
  9.         $email=$_POST['email'];
  10.         $conemail=$_POST['conemail'];
  11.  
  12.         $username = stripslashes($username);
  13.         $password = stripslashes($password);
  14.         $conpassword = stripslashes($conpassword);
  15.         $email = stripslashes($email);
  16.         $conemail = stripslashes($conemail);
  17.         $username = mysql_real_escape_string($username);
  18.         $password = mysql_real_escape_string($password);
  19.         $conpassword = mysql_real_escape_string($conpassword);
  20.         $email = mysql_real_escape_string($email);
  21.         $conemail = mysql_real_escape_string($conemail);
  22.        
  23.         if($password==$conpassword && $email==$conemail){
  24.         mysql_select_db("rage", $SQL_CON) or die (mysql_error());
  25.         $sql="INSERT INTO login (account, password, email) VALUES ('$username', '$password', '$email')";
  26.         $result=mysql_query($sql);
  27.         }else{
  28.         echo '<center><FONT COLOR="#737373">Your email and or password does not match its confirmation, Please check again.</FONT></center>';
  29.         }
  30.         break;
  31.     }
  32. }
  33. //Register Form
  34. echo '<html>
  35. <head>
  36. <title>CRL - Community Rage List</title>
  37. <link rel="stylesheet" type="text/css" href="./style.css" media="all" />
  38. </head>
  39. <body>
  40.  
  41. <center>
  42. <table class="border" border="0">
  43. <th class="head" colspan="8">Register</th></table>
  44. <fieldset class="row">
  45. <form action="?action=register" method="post">
  46. Username:    <input type="text" name="account" class="input3" /><br><br>
  47. Password:   <input type="password" name="password" class="input3" /><br><br>
  48. Confirm Password: <input type="password" name="conpassword" class="input3" /><br><br>
  49. Email: <input type="text" name="email" class="input3" /><br><br>
  50. Confirm Email: <input type="text" name="conemail" class="input3" /><br><br>
  51. <input type="submit" value="Register" class="input3" />
  52. </form>
  53. </center>
  54. </fieldset>
  55.  
  56. </body>
  57. </html>';
  58. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement