-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathaddqref.php
35 lines (27 loc) · 905 Bytes
/
addqref.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<?php
$link = mysqli_connect('localhost','root','','qbank');
$availableq=mysqli_query($link,"SELECT id FROM qstn") or die("Selecting question id didn't work");
?>
<html>
<head>
<title>
Add Question Reference
</title>
</head>
<body>
<?php
include 'Includes/header.php';
?>
<form action="submitqref.php" method="POST">
Please enter question reference number:<br><br>
<select name="qref">
<?php for($i= mysqli_num_rows($availableq);$i>0;$i--)
{
echo '<option>'.mysqli_fetch_assoc($availableq)['id'].'</option>';
}?>
</select>
<input type="submit" value="Next" formaction="nextqref.php">
<input type="submit" value="Submit" formaction="submitqref.php">
</form>
</body>
</html>