Advertisement
Guest User

Untitled

a guest
Feb 25th, 2019
135
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.75 KB | None | 0 0
  1. <?php
  2.  
  3.  
  4. include("inc/connection.php");
  5.  
  6. function RegisterStep1() {
  7.  
  8. $txtuser = $_POST['txtName'];
  9. $txtsurname = $_POST['txtSurname'];
  10. $txtemail = $_POST['txtEmail'];
  11. $txtpass = $_POST['txtPassword'];
  12. $txtconfirmpass = $_POST['txtConfirmPass'];
  13. $txtcontactperson = $_POST['txtcompanycontactname'];
  14. $txtCompAddress = $_POST['txtCompAddress'];
  15. $txtRegNo = $_POST['txtRegNo'];
  16. $txtuserpos = $_POST['txtuserpos'];
  17. $txtdepartment = $_POST['txtdepartment'];
  18. $txtcontacts = $_POST['txtcontacts'];
  19. /* check if values are posted */
  20.  
  21.  
  22.  
  23. $txtuser = mysql_real_escape_string($_POST['txtName']);
  24. /* combo company type */
  25. $txtCompAddress = mysql_real_escape_string($_POST['txtCompAddress']);
  26. /* combo locations
  27. */
  28. $txtRegNo = mysql_real_escape_string($_POST['txtRegNo']);
  29. /* combo companysize */
  30. $txtcontactperson = mysql_real_escape_string($_POST['txtcompanycontactname']);
  31. $txtsurname = mysql_real_escape_string($_POST['txtSurname']);
  32. $txtuserpos = mysql_real_escape_string($_POST['txtuserpos']);
  33.  
  34. $txtdepartment = mysql_real_escape_string($_POST['txtdepartment']);
  35. $txtcontacts = mysql_real_escape_string($_POST['txtcontacts']);
  36. $txtemail = mysql_real_escape_string($_POST['txtEmail']);
  37. $txtpass = mysql_real_escape_string($_POST['txtPassword']);
  38. $txtconfirmpass = mysql_real_escape_string($_POST['txtConfirmPass']);
  39.  
  40.  
  41.  
  42. $q = "INSERT INTO company(Name,Type,Address,Location,RegisteredNumber,CompanySize,ContactPerson,Surname,Position,Department,Contacts,DateResgistered,AccountStatus,Email,Password)
  43. Values('" . $txtuser . "','" . $txtCompAddress . "','" . $txtRegNo . "','" . $txtcontactperson . "','" . $txtsurname . "','" . $txtuserpos . "','" . $txtRegNo . "','" . $txtdepartment . "','" . $txtcontacts . "','" . $txtemail . "','" . $txtpass . "')";
  44.  
  45. $submitquery = mysql_query($q);
  46. if ($submitquery) {
  47. echo"<div id='results'>Error occured while creating account,please try again in few minutes</div>";
  48. } else {
  49. echo "<div id='results'>Thanks for signing up</div>";
  50. }
  51.  
  52. }
  53.  
  54. ?>
  55.  
  56. $submitquery = mysql_query($q);
  57. if ($submitquery) {
  58. echo"<div id='results'>Error occured while creating account,please try again in few minutes</div>";
  59. } else {
  60. echo "<div id='results'>Thanks for signing up</div>";
  61. }
  62.  
  63. $submitquery = mysql_query($q);
  64. if (!$submitquery) {
  65. echo"<div id='results'>Error occured while creating account,please try again in few minutes</div>";
  66. } else {
  67. echo "<div id='results'>Thanks for signing up</div>";
  68. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement