Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- session_start();
- ?>
- <html>
- <head>
- <title>Registration</title>
- </head>
- <center>
- <table border="0" background = "blue.png" width =800 height=600>
- <tr>
- <td>
- <center>
- <?php
- $host = "localhost";
- $user = "root";
- $pass = "";
- $db = "jobx";
- $connection = mysql_connect($host, $user, $pass) or die ("Unable to connect!");
- mysql_select_db($db) or die ("Unable to select database!");
- $role_id = $_POST['role_id'];
- $name = $_POST['name'];
- $email = $_POST['email'];
- $sha1_password = $_POST['pwd1'];
- print_r($name)
- /*
- $username = $_POST['username'];
- $sha1_password = $_POST['pwd1'];
- $firstname = $_POST['firstname'];
- $lastname = $_POST['lastname'];
- $email = $_POST['email'];
- */
- $checkuser = mysql_query("SELECT email FROM xuser WHERE email='$email'");
- $username_exist = mysql_num_rows($checkuser);
- $query1 = "INSERT INTO xuser (role_id, name, email, password) VALUES ('$role_id','$name','$email','$sha1_password')";
- mysql_query($query1) or die(mysql_error());
- $userId = mysql_insert_id();
- $query2 = "INSERT INTO particular (sno) VALUES('$userId')";
- mysql_query($query2);
- echo "<font color = red>Thank you for registering with jobX, we look forward to serving you better...<font color = red>";
- echo "<br><a href='index.php'>log in</a>";
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement