Jump to content

Archived

This topic is now archived and is closed to further replies.

frii

Check Box, Countdown and Counter :)

Recommended Posts

This is My Master Piece
[code]
<html>
<BODY onLoad="document.reizin.rez.focus();">
<?
$pirm_sk = mt_rand(1, 20);
$otr_sk_gatave = mt_rand(1, 5);
if($otr_sk_gatave == 1){
$otr_sk = 5;
}
if($otr_sk_gatave == 2){
$otr_sk = 8;
}
if($otr_sk_gatave == 3){
$otr_sk = 11;
}
if($otr_sk_gatave == 4){
$otr_sk = 17;
}
if($otr_sk_gatave == 5){
$otr_sk = 35;
}
if(isset($_POST['rez'])){
$sk_1 = $_POST['pirm_sk'];
$sk_2 = $_POST['otr_sk'];
$rez = $_POST['rez'];
if(($sk_1 * $sk_2) == $rez){
echo "<b>Correct!</b>";
}
else{
$reez = $sk_1 * $sk_2;
echo "<b>Wrong! - $sk_1 * $sk_2 = $reez!</b>";
}
}
else{
echo "<br>";
}
?>
<form name="reizin" method="POST" action="reiz.php">
<?
echo "$pirm_sk * $otr_sk = ";
?>
<input type="text" name="rez" size="5">
<input type="hidden" name="pirm_sk" value="<? echo "$pirm_sk"; ?>">
<input type="hidden" name="otr_sk" value="<? echo "$otr_sk"; ?>">
</form>
</body>
</html>[/code]

I need help :)
I'm out of time so I'm asking you for a little help This shouldn't be hard at all!
I would like to add checkboxes which allows to multiply with numbers on your choice
$otr_sk_gatave = mt_rand(1, 5); one of them 5,8,11,17 or 35 Like when i check 5 i will multiply 1-20 only with 5 or like 5 and 17 everthing must stay random!

Also i would like Countdown timer like 5 seconds time for answer if not that count as Wrong answer
And Conter that counts correct answers like [!--coloro:#FF0000--][span style=\"color:#FF0000\"][!--/coloro--]21[!--colorc--][/span][!--/colorc--]/[!--coloro:#6633FF--][span style=\"color:#6633FF\"][!--/coloro--]25[!--colorc--][/span][!--/colorc--]
[!--coloro:#FF0000--][span style=\"color:#FF0000\"][!--/coloro--]Correct[!--colorc--][/span][!--/colorc--]
[!--coloro:#6633FF--][span style=\"color:#6633FF\"][!--/coloro--]Total[!--colorc--][/span][!--/colorc--] Like it starts with 0 but every time i answer is goes up by +1 :)


I have no idea how to do that all .. I'm happy that i have gone so far what i have made :D it took me just about 5 h to make this code :D And It would take more than 2 days to i complete all i need.. but i need it earlier so .. maybe somebody can help me ?

[!--sizeo:5--][span style=\"font-size:18pt;line-height:100%\"][!--/sizeo--][!--coloro:#FF9900--][span style=\"color:#FF9900\"][!--/coloro--]Please[!--colorc--][/span][!--/colorc--][!--sizec--][/span][!--/sizec--]

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.