k » Co → C localhost/A1/histQn.php J Apps Maps Email My SOLS Sim Connect >> Other bookmarks E Readir 1. What was Singapo
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am
k » Co → C localhost/A1/histQn.php J Apps Maps Email My SOLS Sim Connect >> Other bookmarks E Readir 1. What was Singapo
$questions = array (
"question1" => "In what
year did Singapore become a fully independent and sovereign nation
on separation from Malaysia?<br></br><input
type=radio onclick = showText(this) name =q1 value
=1>1965<br><br/><input type = radio name =q1
value =2>1964<br><br/><input type = radio name
=q1 value =3>1966",
"question2" => "What was
Singapore originally known as?<br><br><input type =
radio name =q2 value =1>Johor Lama<br></br><input
type =radio name =q2 value
=2>Temasek<br></br><input type = radio name =q2
value =3>Palembang",
"question3" => "Who was
the first president of the Republic of
Singapore?<br><br><input type = radio name =q3 value
=1>Wee Kim Wee<br></br><input type =radio name
=q3 value =2>Benjamin Henry
Sheares<br></br><input type = radio name =q3 value
=3>Yusof Bin Ishak",
"question4" => "The name
Singapore was attributed to this 14th century Sumatran prince. What
was his name?<br><br><input type = radio name =q4
value =1>Sang Nila Utama<br></br><input type
=radio name =q4 value =2>Hayam
Wuruk<br></br><input type = radio name =q4 value
=3>Iskanda Shah",
"question5" => "Who was
Singapore's first Prime Minister?<br><br><input type
= radio name =q5 value =1>Goh Chok
Tong<br></br><input type =radio name =q5 value
=2>Lee Hsien Loong<br></br><input type = radio
name =q5 value =3>Lee Kwan Yew",
"question6" => "Which
European is credited with the founding of modern Singapore in
1819?<br><br><input type = radio name =q6 value
=1>John Crawford<br></br><input type =radio name
=q6 value =2>William Farquhar<br></br><input type
= radio name =q6 value =3>Sir Stamford Raffles"
);
$answer = array(
"question1" =>
"1965",
"question2" =>
"Temasek",
"question3" => "Yusof Bin
Ishak",
"question4" => "Sang Nila
Utama",
"question5" => "Lee Kwan
Yew",
"question6" => "Sir
Stamford Raffles"
);
$random_keys = array_rand($questions, 3);
if (isset($_POST['submit'])) {
include('submitAnswers.php');
?>
<form method="POST"
action="mainpage.php">
<input
type="submit" name="typeOfquiz" value="History" />
<input
type="submit" name="typeOfquiz" value="Mathematics" />
<input
type="submit" name="typeOfquiz" value="Exit" />
</form>
<?php
} else {
?>
<form action="histQn.php"
method="POST">
<?php
for ($i=0;
$i<count($random_keys); $i++) {
?>
<p>
<?php echo $i+1 . ". " .
$questions[$random_keys[$i]] ?> <br></br> <input
type="text" name="userAns[<?php echo $random_keys[$i] ?>]"
required />
</p>
<?php
}
?>
<input
type="submit" name="submit" value="Submit" />
<input
type="reset" name="reset" value="Clear" />
</form>
<?php
}
?>
</body>
</html>
k » Co → C localhost/A1/histQn.php J Apps Maps Email My SOLS Sim Connect >> Other bookmarks E Readir 1. What was Singapore originally known as? O Johor Lama Temasek O Palembang 2. Who was the first president of the Republic of Singapore? Wee Kim Wee Benjamin Henry Sheares Yusof Bin Ishak 3. Which European is credited with the founding of modern Singapore in 1819? O John Crawford O William Farquhar O Sir Stamford Raffles Submit Clear