-
Notifications
You must be signed in to change notification settings - Fork 0
/
jawab_soalan.php
36 lines (34 loc) · 1.22 KB
/
jawab_soalan.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
33
34
35
36
<?php
include('sambungan.php');
?>
<html>
<link rel="stylesheet" href="senarai.css">
<link rel="stylesheet" href="button.css">
<body>
<form action="jawab_semak.php" method="post">
<table>
<caption>SOALAN KUIZ ONLINE</caption>
<tr>
<th>Bil</th>
<th>Soalan</th>
</tr>
<?php
$sql = "select * from soalan order by idsoalan ASC";
$data = mysqli_query($sambungan, $sql);
$bil = 1;
while ($soalan = mysqli_fetch_array($data)) {
?>
<tr>
<td class="bil"><?php echo $bil; ?></td>
<td class="soalan">
<?php echo $soalan['namasoalan']; ?><br>
<input type="radio" name="<?php echo $soalan['idsoalan']; ?>" value="A"><?php echo "A. ".$soalan['pilihana']; ?><br>
<input type="radio" name="<?php echo $soalan['idsoalan']; ?>" value="B"><?php echo "B. ".$soalan['pilihanb']; ?><br>
<input type="radio" name="<?php echo $soalan['idsoalan']; ?>" value="C"><?php echo "C. ".$soalan['pilihanc']; ?><br>
</td>
</tr>
<?php $bil = $bil + 1; } ?>
</table>
<button class="semak" type="submit">Semak</button>
</form>
</body>