survey_seahorse

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

commit dd2c7de7d89b5acd9fbbc9a110597420d0cf2ea9
parent b347033ca449fe3a8ef54f211711adbfce919258
Author: John Kubach <johnkubach@gmail.com>
Date:   Sat, 15 Dec 2018 15:49:47 -0500

added option to print results chart

Diffstat:
Mwebsite/res/script/chart.php | 19++++++++++++++++++-
1 file changed, 18 insertions(+), 1 deletion(-)

diff --git a/website/res/script/chart.php b/website/res/script/chart.php @@ -4,16 +4,33 @@ <title>Question <?php echo $_GET['question'] ?> Details</title> <style type="text/css"> #chart-container { - width: 640px; + width: 800px; height: auto; } </style> </head> <body> <center> +<?php +ini_set('display_errors', 'On'); +error_reporting(E_ALL | E_STRICT); +include '../../config.php'; +$question = $_GET['question']; +$sid = $_GET['sid']; +$sql = "SELECT question_content FROM question WHERE (survey_id=$sid AND question_number=$question);"; +$result = mysqli_query($connect, $sql); +$title = mysqli_fetch_assoc($result)['question_content']; + +echo $title; +?> + <div id="chart-container"> <canvas id="mycanvas"></canvas> </div> +<br> <br> +<input type="button" + onClick="window.print()" + value="Print This Page"/> <!-- javascript --> <script type="text/javascript" src="jquery-3.3.1.min.js"></script>