survey_seahorse

Software Engineering Project - Fall 2018
Log | Files | Refs | README

chart.php (1103B)


      1 <!DOCTYPE html>
      2 <html>
      3     <head>
      4     <title>Question <?php echo $_GET['question'] ?> Details</title>
      5         <style type="text/css">
      6 #chart-container {
      7     width: 800px;
      8     height: auto;
      9 }
     10         </style>
     11     </head>
     12     <body>
     13         <center>
     14 <?php
     15 ini_set('display_errors', 'On');
     16 error_reporting(E_ALL | E_STRICT);   
     17 include '../../config.php';
     18 $question = $_GET['question'];
     19 $sid = $_GET['sid'];
     20 $sql = "SELECT question_content FROM question WHERE (survey_id=$sid AND question_number=$question);";
     21 $result = mysqli_query($connect, $sql);
     22 $title = mysqli_fetch_assoc($result)['question_content'];
     23 
     24 echo $title;
     25 ?>
     26 
     27             <div id="chart-container">
     28                 <canvas id="mycanvas"></canvas>
     29             </div>
     30 <br> <br>
     31 <input type="button"
     32   onClick="window.print()"
     33   value="Print This Page"/>
     34 
     35             <!-- javascript -->
     36             <script type="text/javascript" src="jquery-3.3.1.min.js"></script>
     37             <script type="text/javascript" src="Chart.min.js"></script>
     38             <script type="text/javascript" src="app.js"></script>
     39         </center>
     40     </body>
     41 </html>