Advertisement
melody45

signup page

Mar 25th, 2015
203
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.99 KB | None | 0 0
  1. <?php
  2. error_reporting(0);
  3. include_once 'common/conn.php';
  4.  
  5. if(isset($_REQUEST['u_email']) && isset($_REQUEST['u_pass']))
  6. {
  7. try
  8. {
  9. $flag = 0;
  10. $u_email = $_REQUEST['u_email'];
  11. $u_pass = $_REQUEST['u_pass'];
  12. $u_name = $_REQUEST['u_name'];
  13. $fname = $_REQUEST['first_name'];
  14. $lname = $_REQUEST['last_name'];
  15. $phone = $_REQUEST['u_contno'];
  16. $address = $_REQUEST['u_address'];
  17. $city = $_REQUEST['city'];
  18. $country = $_REQUEST['country'];
  19. $zip = $_REQUEST['zip'];
  20. $status = $_REQUEST['u_status'];
  21. $qry_insert_user = "INSERT INTO xo_user SET u_email='$u_email', first_name='$fname', last_name='$lname', u_contno='$phone', u_name='$u_name', u_status='$status', u_address='$address', city='$city', country='$country', zip='$zip', u_pass='$u_pass'";
  22. if(mysql_query($qry_insert_user))
  23. {
  24. $flag = 1;
  25. }
  26. else
  27. {
  28. $flag = 2;
  29.  
  30. }
  31.  
  32. }
  33. catch (Exception $ex)
  34. {
  35. echo "Exception found", $ex->getMessage();
  36.  
  37. }
  38. }
  39.  
  40.  
  41.  
  42. ?>
  43.  
  44.  
  45.  
  46.  
  47. <meta charset="utf-8">
  48. <title>Admin Panel</title>
  49. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  50. <meta name="description" content="Charisma, a fully featured, responsive, HTML5, Bootstrap admin template.">
  51. <meta name="author" content="">
  52.  
  53. <!-- The styles -->
  54. <link id="bs-css" href="css/bootstrap-cerulean.css" rel="stylesheet">
  55. <style type="text/css">
  56. body {
  57. padding-bottom: 40px;
  58. }
  59. .sidebar-nav {
  60. padding: 9px 0;
  61. }
  62. </style>
  63. <link href="css/bootstrap-responsive.css" rel="stylesheet">
  64. <link href="css/charisma-app.css" rel="stylesheet">
  65. <link href="css/jquery-ui-1.8.21.custom.css" rel="stylesheet">
  66. <link href='css/fullcalendar.css' rel='stylesheet'>
  67. <link href='css/fullcalendar.print.css' rel='stylesheet' media='print'>
  68. <link href='css/chosen.css' rel='stylesheet'>
  69. <link href='css/uniform.default.css' rel='stylesheet'>
  70. <link href='css/colorbox.css' rel='stylesheet'>
  71. <link href='css/jquery.cleditor.css' rel='stylesheet'>
  72. <link href='css/jquery.noty.css' rel='stylesheet'>
  73. <link href='css/noty_theme_default.css' rel='stylesheet'>
  74. <link href='css/elfinder.min.css' rel='stylesheet'>
  75. <link href='css/elfinder.theme.css' rel='stylesheet'>
  76. <link href='css/jquery.iphone.toggle.css' rel='stylesheet'>
  77. <link href='css/opa-icons.css' rel='stylesheet'>
  78. <link href='css/uploadify.css' rel='stylesheet'>
  79.  
  80. <!-- The HTML5 shim, for IE6-8 support of HTML5 elements -->
  81. <!--[if lt IE 9]>
  82. <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
  83. <![endif]-->
  84.  
  85. <!-- The fav icon -->
  86. <link rel="shortcut icon" href="img/favicon.ico">
  87. <br><br>
  88.  
  89. <div align="center">
  90. <h1>Fill the Form below to Register</h1>
  91. <br>
  92. <div class="row-fluid sortable" style="width:600px;">
  93. <div class="box span12">
  94.  
  95.  
  96. <div class="box-content">
  97. <br>
  98. <form action="" method="post" name="add_form" onsubmit="return validpass()" enctype="multipart/form-data">
  99.  
  100. <fieldset>
  101. <?PHP
  102.  
  103. if($flag==2)
  104. {
  105. echo '<h4 class="alert alert-danger">Your Request Can not be processed. This mail is already Used</h4>';
  106. }
  107. if($flag==1)
  108. {
  109. echo '<h4 class="alert alert_success">Thanks! You are registered Successfully. <a href="login.php">Login</a></h4>';
  110. }
  111. ?>
  112. <div align="center">
  113. <table border="0" width="700" style="padding-left:20px;margin-left:40px;">
  114. <tr><td>
  115. <div class="control-group">
  116. <label class="control-label" for="typeahead"><b>First Name</b> </label></td>
  117. <td><div class="controls">
  118. <input type="text" name="first_name" required="yes" class="span6 typeahead" id="typeahead" >
  119.  
  120. </div>
  121. </div></td></tr>
  122.  
  123. <tr><td>
  124. <div class="control-group">
  125. <label class="control-label" for="typeahead"><b>Last Name</b> </label></td>
  126. <td><div class="controls">
  127. <input type="text" name="last_name" class="span6 typeahead" id="typeahead" >
  128.  
  129. </div>
  130. </div></td></tr>
  131.  
  132. <tr><td>
  133. <div class="control-group">
  134. <label class="control-label" for="typeahead"><b>Username</b> </label></td>
  135. <td><div class="controls">
  136. <input type="text" name="u_name" required="yes" class="span6 typeahead" id="typeahead" >
  137.  
  138. </div>
  139. </div></td></tr>
  140.  
  141. <tr><td>
  142. <div class="control-group">
  143. <label class="control-label" for="typeahead"><b>Email</b> </label></td>
  144. <td><div class="controls">
  145. <input type="email" required="yes" name="u_email" class="span6 typeahead" id="typeahead" >
  146.  
  147. </div>
  148. </div></td></tr>
  149.  
  150. <tr><td>
  151. <div class="control-group">
  152. <label class="control-label" for="typeahead"><b>Password</b> </label></td>
  153. <td><div class="controls">
  154. <input type="password" required="yes" name="u_pass" class="span6 typeahead" id="typeahead" >
  155.  
  156. </div>
  157. </div></td></tr>
  158.  
  159. <tr><td>
  160. <div class="control-group">
  161. <label class="control-label" for="typeahead"><b>Retype Password </b></label></td>
  162. <td><div class="controls">
  163. <input type="password" required="yes" name="u_pass1" class="span6 typeahead" id="typeahead" >
  164.  
  165. </div>
  166. </div></td></tr>
  167.  
  168. <tr><td>
  169. <div class="control-group">
  170. <label class="control-label" for="typeahead"><b>Phone</b> </label></td>
  171. <td><div class="controls">
  172. <input type="text" name="u_contno" class="span6 typeahead" id="typeahead" >
  173.  
  174. </div>
  175. </div></td></tr>
  176.  
  177. <tr><td>
  178. <div class="control-group">
  179. <label class="control-label" for="typeahead"><b>Address</b> </label></td>
  180. <td><div class="controls">
  181. <input type="text" name="u_address" class="span6 typeahead" id="typeahead" >
  182.  
  183. </div>
  184. </div></td></tr>
  185.  
  186. <tr><td>
  187. <div class="control-group">
  188. <label class="control-label" for="typeahead"><b>City</b> </label></td>
  189. <td><div class="controls">
  190. <input type="text" name="city" class="span6 typeahead" id="typeahead" >
  191.  
  192. </div>
  193. </div></td></tr>
  194.  
  195. <tr><td>
  196. <div class="control-group">
  197. <label class="control-label" for="typeahead"><b>Country</b> </label></td>
  198. <td><div class="controls">
  199. <input type="text" name="country" class="span6 typeahead" id="typeahead" >
  200.  
  201. </div>
  202. </div></td></tr>
  203.  
  204. <tr><td>
  205. <div class="control-group">
  206. <label class="control-label" for="typeahead"><b>Zip </b></label></td>
  207. <td><div class="controls">
  208. <input type="text" name="zip" class="span6 typeahead" id="typeahead" >
  209.  
  210. </div>
  211. </div></td></tr>
  212. <input type="hidden" name="u_status" value="1">
  213.  
  214. </table>
  215.  
  216.  
  217.  
  218.  
  219. </div>
  220. <br>
  221. <div align="center" style="margin-bottom:15px;">
  222.  
  223. <button type="submit" onclick="validpass()" class="btn btn-primary">Add User</button>
  224. <button type="reset" class="btn">Cancel</button>
  225.  
  226. </div>
  227. </fieldset>
  228. </form>
  229. </div>
  230. </div>
  231. </div><!--/span-->
  232.  
  233. </div><!--/row-->
  234. </div>
  235. <script type="text/javascript">
  236. function validpass()
  237. {
  238. var x = document.forms["add_form"]["u_pass"].value;
  239. var y = document.forms["add_form"]["u_pass1"].value;
  240. if(x==y)
  241. {
  242.  
  243. }
  244. else
  245. {
  246. alert('Password Mismatched');
  247.  
  248. return false;
  249. }
  250. }
  251. </script>
  252.  
  253.  
  254.  
  255.  
  256.  
  257. <?php include('footer.php'); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement