123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145 |
- <!---
-
- Developer: Coralys Cubero Rivera
- Fall 2018
-
- This script allows the user to see the specific information of a questionnaire associated to an experience.
-
-
-
- Updated by: Víctor A. Hernández
- Summer 2019
-
- --->
-
- <?php
-
- require_once 'processes/config.php';
- require_once 'processes/dbh.inc.php';
-
- if(isset($_GET['view'])) {
- $query = "SELECT * FROM `questionnair` WHERE `id`='".$_GET['view']."';";
- $result = mysqli_query($connection, $query);
- if(!$result) die("Error: ".mysqli_error($connection));
- $row = mysqli_fetch_array($result);
- }
-
- include_once 'header.php';
- ?>
-
- <div class='container'>
- <br>
- <h2>QUESTIONNAIRE <?php echo $row[0]; ?></h2>
- <br>
- <p> <font size='4'> <b> Title: </b> <?php echo $row[1]; ?> </font> </p>
- <p> <font size='4'> <b> Description: </b> <?php echo $row[2]; ?> </font>
- <a class='btn btn-info' style='float: right;' href='editQuestionnaire.php?edit=<?php echo $row[0]; ?>'> Edit Questionnaire </a>
- </p>
- <table class='table table-hover' id='tableEvaluations'>
- <?php
- $result = mysqli_query($connection, "SELECT `id`, `premise` FROM `question` WHERE `id` IN (SELECT `id_question` FROM `questionnair_question` WHERE `id_questionnair`='".$row[0]."');");
- echo "
- <thead>
- <tr>
- <th> ID </th>
- <th> Questions </th>
- </tr>
- </thead>
- <tbody>";
- while($row = mysqli_fetch_array($result)) {
- echo " <tr>";
- echo "<td> <p> ".$row['id']."</p> </td>";
- echo "<td> <p> ".$row['premise']." </p> </td>";
- echo "</tr>";
- }
- echo "</tbody>"
- ?>
- </table>
- <br><br>
- </div>
-
- <?php include_once 'footer.html'; ?>
-
- <?php
-
- ?>
|