Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head></head>
- <body>
- <?php
- header("Content-Type: text/html; charset = utf-8");
- //data with connection info
- include'inc.db.Questions.php';
- // Create connection
- $conn = new mysqli($servername, $username, $password, $dbname);
- // Check connection
- if ($conn->connect_error) {
- die("Connection failed: " . $conn->connect_error);
- }
- mysqli_set_charset($conn, "utf8");
- $sql = "SELECT id, question FROM NetworkQuestions WHERE variant = '4.4'";
- $result = $conn->query($sql);
- // $result = mysqli_querry($conn, "SELECT id, quastion FROM NetworkQuastions");
- if ($result->num_rows > 0) {
- // output data of each row
- while($row = $result->fetch_assoc()) {
- // echo "<b>id at </b> " . $row["id"]. "<b> -></b> " . $row["question"]. "<br>";
- print"<b>{$row["question"]}</b><br><br>";
- echo"<hr>";
- //show all answers script
- $Questions_ID=$row["id"];
- //echo"<p>".$Questions_ID." </p> ";
- //echo"<br>";
- include "CommentsShow2.php";
- //echo"<p>Another test string</p>";
- //echo"<br><hr>";
- //insert script tag
- // readfile('button.html');
- print"<form method ='POST' action= 'Com.Insert.Q.php'>
- <input type ='hidden' name = 'qid' value =' $Questions_ID' >
- <textarea name= 'text' cols = '66' rows = '2'></textarea>
- <button type= 'submit' name = 'submitComment'>Fail?</button>
- </form>";
- echo"<hr>";
- echo"<hr>";
- echo"<hr>";
- echo"<br>";
- }
- } else {
- echo "0 results of Finding Questions";
- }
- $conn->close();
- ?>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment