Advertisement
Guest User

Untitled

a guest
Oct 24th, 2014
155
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.44 KB | None | 0 0
  1. <?php
  2. include('includes/login_connection.php');
  3.  
  4. // $query = "select * from personal_details, course_codes";
  5. $query = "select p.usn, p.name, p.sem, p.year, cg.cur_cgpa, c.cc1, c.cc2, c.cc3, c.cc4, c.cc5, c.cc6, c.cc7, c.cc8, c.cc9 from personal_details p, course_codes c, cgpa_details cg where p.usn = c.usn AND p.usn = cg.usn order by p.usn";
  6.  
  7. $run = mysql_query($query) or die($query."<br/><br/>".mysql_error());
  8. $num=mysql_numrows($run);
  9. echo "No. of registered students: $num";
  10. while($row = mysql_fetch_assoc($run)){
  11.  
  12.  
  13. echo "<tr>";
  14. echo "<td>" . $row['usn'] . " </td>";
  15. echo "<td>" . $row['name'] . " </td>";
  16. echo "<td>" . $row['sem'] . " </td>";
  17. echo "<td>" . $row['year'] . " </td>";
  18. echo "<td>" . $row['cur_cgpa'] . " </td>";
  19. echo "<td>" . $row['cc1'] . " </td>";
  20. echo "<td>" . $row['cc2'] . " </td>";
  21. echo "<td>" . $row['cc3'] . " </td>";
  22. echo "<td>" . $row['cc4'] . " </td>";
  23. echo "<td>" . $row['cc5'] . " </td>";
  24. echo "<td>" . $row['cc6'] . " </td>";
  25. echo "<td>" . $row['cc7'] . " </td>";
  26. echo "<td>" . $row['cc8'] . " </td>";
  27. echo "<td>" . $row['cc9'] . " </td>";
  28. echo "</tr>";
  29.  
  30. // echo "</table>";
  31.  
  32.  
  33. }
  34. mysql_close($bd);
  35.  
  36. ?>
  37.  
  38. <table border='1' align="center" style="font-size:14px" width="95%" cellspacing="3" class="db_table" >
  39.  
  40. <tr class="db_table_tr" >
  41. <th class="db_table_th" >USN</th>
  42. <th class="db_table_th" >Name</th>
  43. <th class="db_table_th" >Sem</th>
  44. <th class="db_table_th" >Year</th>
  45. <th class="db_table_th" >CGPA</th>
  46. <th class="db_table_th" >Subject-1</th>
  47. <th class="db_table_th" >Subject-2</th>
  48. <th class="db_table_th" >Subject-3</th>
  49. <th class="db_table_th" >Subject-4</th>
  50. <th class="db_table_th" >Subject-5</th>
  51. <th class="db_table_th" >Subject-6</th>
  52. <th class="db_table_th" >Subject-7</th>
  53. <th class="db_table_th" >Subject-8</th>
  54. <th class="db_table_th" >Subject-9</th>
  55. </tr></table>
  56.  
  57. echo "<td>" . $row['usn'] . " </td>";
  58.  
  59. echo "<td> <a href='http://somedomain/somepath/usn_handler.php?usn='" . $row['usn'] .
  60. "' >" . $row['usn'] . "<a/> </td>";
  61.  
  62. <?php
  63. $link = $row['usn'];
  64. ?>
  65. <td><a href="filename.php?usn=<?php echo $link; ?>"><?php echo $link; ?></a></td>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement