commit e8a6bdb3e89ae82f08b561128bba1074928abd69
parent a60c7bc96abe9e173817d290782f3099db46cb5e
Author: JKubach <JKubach@users.noreply.github.com>
Date: Sat, 15 Dec 2018 15:54:05 -0500
Merge pull request #6 from JKubach/jkubach/testing
Jkubach/testing
Diffstat:
3 files changed, 18 insertions(+), 28 deletions(-)
diff --git a/website/res/script/chart.html b/website/res/script/chart.html
@@ -1,24 +0,0 @@
-<!DOCTYPE html>
-<html>
- <head>
- <title>ChartJS - BarGraph</title>
- <style type="text/css">
-#chart-container {
- width: 640px;
- height: auto;
-}
- </style>
- </head>
- <body>
- <center>
- <div id="chart-container">
- <canvas id="mycanvas"></canvas>
- </div>
-
- <!-- javascript -->
- <script type="text/javascript" src="jquery-3.3.1.min.js"></script>
- <script type="text/javascript" src="Chart.min.js"></script>
- <script type="text/javascript" src="app.js"></script>
- </center>
- </body>
-</html>
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>
diff --git a/website/results.php b/website/results.php
@@ -1,3 +0,0 @@
-<?php
-session_start();
-include_once 'config.php';