Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // result sheet
- <?php
- /*
- Template Name:Result Sheet
- */
- get_header(); ?>
- <div id="container">
- <div id="content" role="main">
- <?php
- mysql_connect("localhost","root","");
- mysql_select_db("resultsheettable") or die("database could not connect ");
- ?>
- <?php
- $roll = isset($_POST['roll']) ? $_POST['roll'] : null;
- $board = isset($_POST['board']) ? $_POST['board'] : null;
- $year = isset($_POST['year']) ? $_POST['year'] : null;
- $query="select * from result_sheet where roll='$roll' and board='$board' and year='$year'";
- $result=mysql_query($query);
- ?>
- <style type="text/css">
- table{}
- table tr{}
- table th{}
- table td{}
- table tr,th,td{border:1px solid #111;padding:10px;color:#111}
- table a{}
- table tr th td{}}
- </style>
- <table style="" cellpadding="0px" cellspacing="0px"
- align="center" border="0">
- <tr>
- <td colspan="4" style="background:#0066FF;text-align:center; color:#FFFFFF; font-size:20px">VIEW YOUR
- RESULT DATABASE</td></tr>
- <?php while ($row = mysql_fetch_array($result)) : ?>
- <tr>
- <td>Name of Student</td><td><?php echo $row['name'];?></td>
- <td>Father</td><td><?php echo $row['father'];?></td>
- </tr>
- <tr>
- <td>Roll</td><td><?php echo $row['roll'];?></td>
- <td>Roll</td><td><?php echo $row['roll'];?></td>
- </tr>
- <tr>
- <td>School</td><td><?php echo $row['school'];?></td>
- <td>Board</td><td><?php echo $row['board'];?></td></tr>
- <tr>
- <td>Year</td><td><?php echo $row['year'];?></td>
- <td>GPA</td><td><?php echo $row['gpa'];?></td></tr>
- <tr>
- <?php endwhile ?>
- </table>
- <?php if(have_posts()) : ?>
- <?php while (have_posts()) : the_post(); ?>
- <!-- result sheet start -->
- <form id="form1" name="form1" method="post" action="<?php the_permalink();?>" >
- <label><span class="style1"><?php _e( 'Find out your SSC result', 'smof' ); ?></span><br />
- <br />
- <strong><?php _e( 'Roll', 'smof' ); ?></strong>:
- <input name="roll" type="text" id="roll" />
- </label>
- <p>
- <label><strong><?php _e( 'Board', 'smof' ); ?></strong>:
- <select name="board" id="board">
- <option><?php _e( 'jessore', 'smof' ); ?></option>
- <option><?php _e( 'barisal', 'smof' ); ?></option>
- <option><?php _e( 'dhaka', 'smof' ); ?></option>
- <option><?php _e( 'Rajshahi', 'smof' ); ?></option>
- <option><?php _e( 'shylet', 'smof' ); ?></option>
- <option><?php _e( 'chitagong', 'smof' ); ?></option>
- </select>
- </label>
- </br>
- </p>
- <label><strong><?php _e( 'Year', 'smof' ); ?></strong>:
- <select name="year" id="year">
- <option><?php _e( '2015', 'smof' ); ?></option>
- <option><?php _e( '2014', 'smof' ); ?></option>
- <option><?php _e( '2013', 'smof' ); ?></option>
- <option><?php _e( '2012', 'smof' ); ?></option>
- <option><?php _e( '2011', 'smof' ); ?></option>
- <option><?php _e( '2010', 'smof' ); ?></option>
- <option><?php _e( '2005', 'smof' ); ?></option>
- </select>
- </label>
- <p>
- <input type="submit" name="Submit" value="<?php esc_attr_e( 'Submit', 'smof' ); ?>" />
- </p>
- </form>
- <!-- result sheet end -->
- <?php endwhile; ?>
- <?php endif; ?>
- </div><!-- #content -->
- </div><!-- #container -->
- <?php get_sidebar(); ?>
- <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement