daily pastebin goal
28%
SHARE
TWEET

Untitled

a guest Jun 8th, 2017 246 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2.     session_start();
  3. ?>
  4.  
  5. <html>
  6. <head>
  7. <title>Registration</title>
  8. </head>
  9.  
  10. <center>
  11. <table border="0" background = "blue.png" width =800 height=600>
  12. <tr>
  13. <td>
  14. <center>
  15.  
  16. <?php  
  17.     $host = "localhost";
  18.     $user = "root";
  19.     $pass = "";
  20.     $db = "jobx";
  21.    
  22.     $connection = mysql_connect($host, $user, $pass) or die ("Unable to connect!");
  23.     mysql_select_db($db) or die ("Unable to select database!");
  24.    
  25.     $role_id = $_POST['role_id'];
  26.     $name = $_POST['name'];
  27.     $email = $_POST['email'];
  28.     $sha1_password = $_POST['pwd1'];
  29.     print_r($name)
  30.     /*
  31.     $username = $_POST['username'];
  32.     $sha1_password = $_POST['pwd1'];
  33.     $firstname = $_POST['firstname'];
  34.     $lastname = $_POST['lastname'];
  35.     $email = $_POST['email'];
  36.     */
  37.    
  38.     $checkuser = mysql_query("SELECT email FROM xuser WHERE email='$email'");
  39.     $username_exist = mysql_num_rows($checkuser);
  40.  
  41.     $query1 = "INSERT INTO xuser (role_id, name, email, password) VALUES ('$role_id','$name','$email','$sha1_password')";
  42.     mysql_query($query1) or die(mysql_error());
  43.     $userId = mysql_insert_id();
  44.     $query2 = "INSERT INTO particular (sno) VALUES('$userId')";
  45.     mysql_query($query2);
  46.    
  47.     echo "<font color = red>Thank you for registering with jobX, we look forward to serving you better...<font color = red>";
  48.     echo "<br><a href='index.php'>log in</a>";
  49. ?>
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