Advertisement
Guest User

Untitled

a guest
May 4th, 2017
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.05 KB | None | 0 0
  1. <html>
  2. <title>Report Academic Dishonesty</title>
  3. <center>
  4. <img src="KSUlogo.png" alt="KSU Logo" style="width:600px;height:150px;">
  5. <h1> Academic Dishonesty Reporting Form </h1>
  6.  
  7. <?php
  8. //Validate that the Banner ID entered exists in the database, 498672563 for testing;
  9.  
  10. $banner = $_POST['BannerID'];
  11.  
  12. $username = 'root';
  13. $password = '123';
  14. $database = 'banner';
  15.  
  16. $conn = mysqli_connect('localhost',$username,$password,$database);
  17.  
  18. $SQL = "SELECT * FROM instructor WHERE Instructor_Banner_ID = $banner";
  19.  
  20. $recordset = mysqli_query($conn, $SQL);
  21. if ($recordset == false) {
  22. echo "ID not known";
  23. die();
  24. };
  25.  
  26. $SQL = "SELECT * FROM course WHERE Instructor_Banner_ID = $banner";
  27. $recordset = mysqli_query($conn, $SQL);
  28. echo "Please select a course. <br> <br> ";
  29. while ($record=mysqli_fetch_array($recordset,MYSQLI_ASSOC)) {
  30. $title = $record['Course_Name'];
  31. $CID = $record['Course_ID'];
  32. echo "<a href = 'roster.php?CID=$CID'>$title - $CID</a> <br>";
  33. };
  34. ?>
  35. <br>
  36. <button onclick="history.go(-1);">Back </button>
  37. </center>
  38. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement