/regdesk/onlineenquiry.php

https://github.com/idlecool/7th-Sense-Registration · PHP · 208 lines · 204 code · 4 blank · 0 comment · 4 complexity · ae0b9ee16dd2f3b9660cf3d7ca70cb00 MD5 · raw file

  1. <?php
  2. session_start();
  3. if(!isset($_SESSION['regdeskmail']))
  4. {
  5. header("location:index.php");
  6. }
  7. else
  8. {
  9. if(isset($_GET['email']))
  10. {
  11. require_once("config.php");
  12. $cont=mysql_connect($dbhost,$dbuser,$dbpass) or die("Error Connecting the Database");
  13. $selectdb=mysql_select_db($dbselect,$cont) or die("Error in Selecting Database");
  14. $email = mysql_real_escape_string($_GET['email']);
  15. $query = "SELECT * FROM $dbtbl_reg_details WHERE `email` = '$email'";
  16. $result = mysql_query($query) or die('database error 1');
  17. $num = mysql_num_rows($result);
  18. if ( $num == 1 )
  19. {
  20. $row = mysql_fetch_array($result);
  21. ?>
  22. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  23. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  24. <html lang="en">
  25. <head>
  26. <title>Equiry - Online Registartions - 7th Sense</title>
  27. <style type="text/css">
  28. body {
  29. margin: 0px;
  30. padding: 0px 5px 0px 5px;
  31. font-family:"Verdana";
  32. }
  33. a {
  34. text-decoration: none;
  35. }
  36. div#wrapper {
  37. margin: 0px auto;
  38. width: 500px;
  39. min-height: 500px;
  40. }
  41. div#header, div#footer {
  42. height:100px;
  43. }
  44. </style>
  45. </head>
  46. <body>
  47. <div id="wrapper">
  48. <div id="header">
  49. <div id="headline" style="text-align:right;width:100%;font-size:14px;"><p style="text-align:left;float:left;width:80%;margin:0px;padding:0px;"><a href="regdeskdashboard.php">RegDesk Dashboard</a></p><a href="logout.php">logout</a></div>
  50. <h1><span style="font-family:Verdana;font-size:20px; color:#006633"><span style="color:#003399;">Equiry - Online Registartions -</span> 7th Sense</span></h1>
  51. </div>
  52. <div id="details_table">
  53. <table>
  54. <tr>
  55. <td>
  56. <span class="form_fields">Reg ID</span>
  57. </td>
  58. <td>
  59. OL-<?php echo $row['id'];?>
  60. </td>
  61. </tr>
  62. <tr>
  63. <td>
  64. <span class="form_fields">First Name</span>
  65. </td>
  66. <td>
  67. <?php echo $row['first_name'];?>
  68. </td>
  69. </tr>
  70. <tr>
  71. <td>
  72. <span class="form_fields">Last Name</span>
  73. </td>
  74. <td>
  75. <?php echo $row['last_name'];?>
  76. </td>
  77. </tr>
  78. <tr>
  79. <td>
  80. <span class="form_fields">Department</span>
  81. </td>
  82. <td>
  83. <?php echo $row['course'];?>
  84. </td>
  85. </tr>
  86. <tr>
  87. <td>
  88. <span class="form_fields">College ID</span>
  89. </td>
  90. <td>
  91. <?php echo $row['college_id'];?>
  92. </td>
  93. </tr>
  94. <tr>
  95. <td>
  96. <span class="form_fields">College</span>
  97. </td>
  98. <td>
  99. <?php echo $row['college'];?>
  100. </td>
  101. </tr>
  102. <tr>
  103. <td>
  104. <span class="form_fields">City</span>
  105. </td>
  106. <td>
  107. <?php echo $row['city'];?>
  108. </td>
  109. </tr>
  110. <tr>
  111. <td>
  112. <span class="form_fields">Phone</span>
  113. </td>
  114. <td>
  115. <?php echo $row['phone'];?>
  116. </td>
  117. </tr>
  118. <tr>
  119. <td>
  120. <span class="form_fields">Email</span>
  121. </td>
  122. <td>
  123. <?php echo $row['email'];?>
  124. </td>
  125. </tr>
  126. </table>
  127. </div>
  128. <div id="footer">
  129. <br/><br/><br/>
  130. &copy; 7th Sense 2010
  131. </div>
  132. </div>
  133. </body>
  134. </html>
  135. <?php
  136. }
  137. else
  138. {
  139. echo "record not found";
  140. }
  141. }
  142. else
  143. {
  144. ?>
  145. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  146. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  147. <html lang="en">
  148. <head>
  149. <title>Equiry - Online Registartions - 7th Sense</title>
  150. <style type="text/css">
  151. body {
  152. margin: 0px;
  153. padding: 0px 5px 0px 5px;
  154. font-family:"Verdana";
  155. }
  156. a {
  157. text-decoration: none;
  158. }
  159. div#wrapper {
  160. margin: 0px auto;
  161. width: 500px;
  162. min-height: 500px;
  163. }
  164. div#header, div#footer {
  165. height:100px;
  166. }
  167. </style>
  168. </head>
  169. <body>
  170. <div id="wrapper">
  171. <div id="header">
  172. <div id="headline" style="text-align:right;width:100%;font-size:14px;"><p style="text-align:left;float:left;width:80%;margin:0px;padding:0px;"><a href="regdeskdashboard.php">RegDesk Dashboard</a></p><a href="logout.php">logout</a></div>
  173. <h1><span style="font-family:Verdana;font-size:20px; color:#006633"><span style="color:#003399;">Equiry - Online Registartions -</span> 7th Sense</span></h1>
  174. </div>
  175. <div id="details_table" style="text-align:center;width:100%;margin:0px auto;">
  176. <form name="email_equiry_form" method="get" action="" autocomplete="off" style="width:260px;margin:0px auto;">
  177. <table>
  178. <tr>
  179. <td>
  180. Email
  181. </td>
  182. <td>
  183. <input type="text" name="email" style="width:200px;"/>
  184. </td>
  185. </tr>
  186. <tr style="text-align:center;">
  187. <td colspan="2">
  188. <input type="submit" name="submit" value="Submit" onclick="return validate();"/>
  189. </td>
  190. </tr>
  191. </table>
  192. </form>
  193. </div>
  194. <div id="footer">
  195. <br/><br/><br/>
  196. &copy; 7th Sense 2010
  197. </div>
  198. </div>
  199. </body>
  200. </html>
  201. <?php
  202. }
  203. }
  204. ?>