Advertisement
firoze

result sheet

May 10th, 2015
218
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.28 KB | None | 0 0
  1. // result sheet
  2.  
  3. <?php
  4.  
  5. /*
  6. Template Name:Result Sheet
  7. */
  8.  
  9. get_header(); ?>
  10.  
  11. <div id="container">
  12. <div id="content" role="main">
  13. <?php
  14. mysql_connect("localhost","root","");
  15. mysql_select_db("resultsheettable") or die("database could not connect ");
  16. ?>
  17. <?php
  18. $roll = isset($_POST['roll']) ? $_POST['roll'] : null;
  19. $board = isset($_POST['board']) ? $_POST['board'] : null;
  20. $year = isset($_POST['year']) ? $_POST['year'] : null;
  21.  
  22. $query="select * from result_sheet where roll='$roll' and board='$board' and year='$year'";
  23. $result=mysql_query($query);
  24.  
  25. ?>
  26. <style type="text/css">
  27. table{}
  28. table tr{}
  29. table th{}
  30. table td{}
  31. table tr,th,td{border:1px solid #111;padding:10px;color:#111}
  32. table a{}
  33. table tr th td{}}
  34. </style>
  35. <table style="" cellpadding="0px" cellspacing="0px"
  36. align="center" border="0">
  37. <tr>
  38. <td colspan="4" style="background:#0066FF;text-align:center; color:#FFFFFF; font-size:20px">VIEW YOUR
  39. RESULT DATABASE</td></tr>
  40. <?php while ($row = mysql_fetch_array($result)) : ?>
  41. <tr>
  42. <td>Name of Student</td><td><?php echo $row['name'];?></td>
  43.  
  44. <td>Father</td><td><?php echo $row['father'];?></td>
  45. </tr>
  46. <tr>
  47. <td>Roll</td><td><?php echo $row['roll'];?></td>
  48. <td>Roll</td><td><?php echo $row['roll'];?></td>
  49. </tr>
  50. <tr>
  51. <td>School</td><td><?php echo $row['school'];?></td>
  52. <td>Board</td><td><?php echo $row['board'];?></td></tr>
  53. <tr>
  54. <td>Year</td><td><?php echo $row['year'];?></td>
  55. <td>GPA</td><td><?php echo $row['gpa'];?></td></tr>
  56. <tr>
  57. <?php endwhile ?>
  58. </table>
  59.  
  60. <?php if(have_posts()) : ?>
  61. <?php while (have_posts()) : the_post(); ?>
  62. <!-- result sheet start -->
  63. <form id="form1" name="form1" method="post" action="<?php the_permalink();?>" >
  64. <label><span class="style1"><?php _e( 'Find out your SSC result', 'smof' ); ?></span><br />
  65. <br />
  66. <strong><?php _e( 'Roll', 'smof' ); ?></strong>:
  67. <input name="roll" type="text" id="roll" />
  68. </label>
  69. <p>
  70. <label><strong><?php _e( 'Board', 'smof' ); ?></strong>:
  71. <select name="board" id="board">
  72. <option><?php _e( 'jessore', 'smof' ); ?></option>
  73. <option><?php _e( 'barisal', 'smof' ); ?></option>
  74. <option><?php _e( 'dhaka', 'smof' ); ?></option>
  75. <option><?php _e( 'Rajshahi', 'smof' ); ?></option>
  76. <option><?php _e( 'shylet', 'smof' ); ?></option>
  77. <option><?php _e( 'chitagong', 'smof' ); ?></option>
  78. </select>
  79. </label>
  80. </br>
  81. </p>
  82. <label><strong><?php _e( 'Year', 'smof' ); ?></strong>:
  83. <select name="year" id="year">
  84. <option><?php _e( '2015', 'smof' ); ?></option>
  85. <option><?php _e( '2014', 'smof' ); ?></option>
  86. <option><?php _e( '2013', 'smof' ); ?></option>
  87. <option><?php _e( '2012', 'smof' ); ?></option>
  88. <option><?php _e( '2011', 'smof' ); ?></option>
  89. <option><?php _e( '2010', 'smof' ); ?></option>
  90. <option><?php _e( '2005', 'smof' ); ?></option>
  91. </select>
  92. </label>
  93.  
  94. <p>
  95. <input type="submit" name="Submit" value="<?php esc_attr_e( 'Submit', 'smof' ); ?>" />
  96. </p>
  97. </form>
  98. <!-- result sheet end -->
  99. <?php endwhile; ?>
  100. <?php endif; ?>
  101.  
  102. </div><!-- #content -->
  103. </div><!-- #container -->
  104.  
  105. <?php get_sidebar(); ?>
  106. <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement