Advertisement
Guest User

Untitled

a guest
Mar 5th, 2017
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.85 KB | None | 0 0
  1. <form method="post" class="hotel-search-form">
  2. <div align="center" class="tm-form-inner">
  3.  
  4. <div id="login_errorss" style="color:#F00"></div>
  5. <label>Company Name</label><br>
  6. <input type = "text" id = "name" class = "box" placeholder="Name"/><br><br>
  7. <label>Company Username</label><br>
  8. <input type="text" id = "sallam" class = "box" placeholder="username"/><br>
  9. <label>Telephone</label><br>
  10. <input type = "text" id = "tete" class = "box" placeholder="telephone"/><br>
  11. <label>email</label><p id="p1" style="color:#F00"></p><br>
  12. <input type = "text" id = "emem" class = "box" placeholder="telephone"/><br>
  13. <label>Password</label><br>
  14. <input type = "password" id = "passpass" class = "box">
  15. <label>Company Description</label><br>
  16. <textarea style="width:175px" id="description"></textarea>
  17.  
  18. $(document).ready(function() {
  19. $("#submitAddPatient").click(function(){
  20. var user = $("#username").val();
  21. var pass = $("#password").val();
  22. var first = $("#firstname").val();
  23. var last = $("#lastname").val();
  24. var se = $("#sex").val();
  25. var birth = $("#birthdate").val();
  26. var phone = $("#phonenumber").val();
  27. var m1 = $("#m1").val();
  28. var data = "user=" + user + "&pass=" + pass+ "&first=" + first+ "&last=" +
  29. last+ "&se=" + se+ "&birth=" + birth+ "&phone=" +
  30. phone + "&m1=" + m1 ;
  31. $.ajax({method: "post",
  32. url:"seccc.php?",
  33. data: data,
  34. success: function(data){
  35. $("#login_errors").html(data); } }); });
  36.  
  37. if(!$user || !$pass|| !$first|| !$last || !$se || !$birth || !$phone ||
  38. !$m1){echo "Please fill all the fields!";}
  39. else if (!filter_var($m1, FILTER_VALIDATE_EMAIL)){ echo"invalid email";}
  40. else if (!is_numeric($phone) ){echo "invalid phone number";}
  41. else if(strlen($phone) <> 8){echo "Phone number must be 8 digits!";}
  42. else if(strlen($pass) < 5){echo "password at lesat 5 char";}
  43.  
  44. else{
  45.  
  46. $conc = mysqli_connect("localhost", "root" , "0598985166sallam", "project");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement