SHARE
TWEET

Untitled

a guest Oct 23rd, 2017 218 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. require_once('includes/header.inc.php');
  3. ?>
  4. <form id="register" method="post" action="register.php">
  5.                         <fieldset>
  6.                             <h5>Username:</h5>
  7.                             <label for="username">username</label>
  8.                             <input type="text" name="username" id="username" value="" onfocus="if(this.value=='Your name')this.value='';" onblur="if(this.value=='')this.value='Your name';" />
  9.                             <h5>Password:</h5>
  10.                             <label for="password">Password</label>
  11.                             <input type="password" name="password" id="password" value="" onfocus="if(this.value=='What is this about...')this.value='';" onblur="if(this.value=='')this.value='What is this about...';" />
  12.                             <h5>Steam Username:</h5>
  13.                             <label for="steamuser"></label>
  14.                             <input type="text" name="steamuser" id="steamuser"onfocus="if(this.value=='steam user')this.value='';" onblur="if(this.value=='')this.value='steam user';" />
  15.                             <h5>E-mail:</h5>
  16.                             <label for="email">E-mail</label>
  17.                             <input type="text" name="email" id="email" value="" onfocus="if(this.value=='and e-mail')this.value='';" onblur="if(this.value=='')this.value='and e-mail';" />
  18.                             <div id="error"></div>
  19.                             <input type="submit" name="submit" id="submit" value="Register!" />
  20.                         </fieldset>
  21.                     </form>
  22.                    
  23. <?php
  24. require_once('includes/config.inc.php');
  25. require_once('includes/footer.inc.php');
  26. if (isset($_POST['submit'])) {
  27. $id = rand(1, 54345);
  28. $username = mysql_real_escape_string($_POST['username']);
  29. $password = mysql_real_escape_string($_POST['password']);
  30. $email = mysql_real_escape_string($_POST['email']);
  31. $steamid = mysql_real_escape_string($_POST['steamuser']);
  32. $ip = $_SERVER['REMOTE_ADDR'];
  33. $date_time = date("Y-m-d H:i:s");
  34. $hpass = md5($password);
  35. $password = $hpass;
  36. mysql_query("INSERT INTO users (id, username, password, email, steamid, ip, date_time)
  37. VALUES ('$id, $username, $password, $email, $steamid, $ip, $date_time')") or die(mysql_error());
  38. }
  39. ?>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top