http://jamwired.netii.net/
Take a look at the site
Need help in designing one feel free to email
jamwired@mail.com
do like the site
http://www.facebook.com/jamwiredinfo
[3 minutes later]
PHP Code:
create ur own website at [url]http://www.000webhost.com/598762.html[/url]
Simple php code for quiz
<?
if(isset($_POST['submit'])){
$quest1 = $_POST['quest1'];
$quest2 = $_POST['quest2'];
$quest3 = $_POST['quest3'];
$quest4 = $_POST['quest4'];
$quest5 = $_POST['quest5'];
// Lets make sure that everything has been submitted
if($quest1 == NULL OR $quest2 == NULL OR $quest3 == NULL OR $quest4 == NULL OR $quest5 == NULL){
$test_complete .='Please complete the quiz! <a href="javascript:history.go(-1)">Go Back</a>';
}else{
// change the quest1 to the right answer
if($quest1 == "1") {
$test_complete .="Question one is <span class='green'>correct</span>, well done!<br/>";
}else{
$test_complete .="Question one is <span class='red'>incorrect</span>!<br/>";
}
// change the quest2 to the right answer
if($quest2 == "3") {
$test_complete .="Question two is <span class='green'>correct</span>, well done!<br/>";
}else{
$test_complete .="Question two is <span class='red'>incorrect</span>!<br/>";
}
// change the quest3 to the right answer
if($quest3 == "3") {
$test_complete .="Question three is <span class='green'>correct</span>, well done!<br/>";
}else{
$test_complete .="Question three is <span class='red'>incorrect</span>!<br/>";
}
// change the quest4 to the right answer
if($quest4 == "2") {
$test_complete .="Question four is <span class='green'>correct</span>, well done!<br/>";
}else{
$test_complete .="Question four is <span class='red'>incorrect</span>!<br/>";
}
// change the quest5 to the right answer
if($quest5 == "2") {
$test_complete .="Question five is <span class='green'>correct</span>, well done!<br/>";
}else{
$test_complete .="Question five is <span class='red'>incorrect</span>!<br/>";
}
// Now lets see if all the questions are correct, this must match the above quest settings
if($quest1 == "1" & $quest2 == "3" & $quest3 == "3" & $quest4 == "2" & $quest5 == "2"){
$test_complete .="<p>Congratulations, you got all the questions correct!</p>";
}else{
// If any of the questions are not correct lets tell them
$test_complete .='<p>Your not there just yet! <a href="javascript:history.go(-1)">Try again</a></p>';
}}}
?>
<? if(!isset($_POST['submit'])){ ?>
<h2>Quiz </h2>
<p>Lets have some fun and see if you can get all the questions correct .. Good luck!</p>
<form method="post">
<p>1. IF U were Smart how many cheeks would u have?<br>
<input type="radio" name="quest1" value="3">
1<br>
<input type="radio" name="quest1" value="2">
2<br>
<input type="radio" name="quest1" value="1">
4</p>
<p>2. wat is the average IQ for 13 year Old? <br>
<input type="radio" name="quest2" value="1">
80<br>
<input type="radio" name="quest2" value="3">
100<br>
<input type="radio" name="quest2" value="2">
120</p>
<p>3.If there are 6 apples and u take away 4, how many do u have??<br>
<input type="radio" name="quest3" value="2">
2<br>
<input type="radio" name="quest3" value="1">
6<br>
<input type="radio" name="quest3" value="3">
4</p>
<p>4.If U answer this question wrong u lose<br>If u answer it right u lose? <br>
<input type="radio" name="quest4" value="3">
Right
<br>
<input type="radio" name="quest4" value="2">
Correct
<br>
<input type="radio" name="quest4" value="1">
wrong
</p>
<p>5. how many f's ar there in this ??<br>A fisher man went to fish to the fish fishing valley. <br>
<input type="radio" name="quest5" value="3">
4
<br>
<input type="radio" name="quest5" value="2">
1<br>
<input type="radio" name="quest5" value="1">
5
</p>
<p>
<input type="submit" name="submit" value="Submit Quiz">
</p>
</form>
<? }else{
echo "<h2>Quiz Results</h2>
<p>".$test_complete."</p>";
}?>