Jump to content

Recommended Posts

hi can i know why is my timer script not working where went wrong ?

 

can anyone help me ?

 

heres the javascript part

<script language="javascript">
var timerDown = new Number();
var timerDown = <?=$qset['timeset']?>;
var timeremaining;
alert("<?=getlang("questionstarttest",1)?>");
setTimeout("startCountdown()",1000);
function startCountdown(){
if(timerDown==0){
	numberCountdown.innerText = "<?=getlang("questionendtest",1)?>";
	timerDown = -1;
	document.forms[0].reset();
	document.forms[0].submit();
}
if((timerDown - 1) >= 0){
	timerDown = timerDown - 1;
	timeremaining = "Time Remaining: "+timerDown+" seconds";
	numberCountdown.innerText = timeremaining;
	window.status = timeremaining;
	setTimeout("startCountdown()",999);
}
}
</script>

 

and heres my code with my php

<?php
include_once('extension.inc');
include_once('lib/constants' . PHPEX);
include_once('lib/database' . PHPEX);
include_once('lib/login' . PHPEX);
include_once('lib/output' . PHPEX);

createHead("Questions");
openDB();

//Define Constants
if( getCfgVal("inline_images") == 1 ){
DEFINE ('INLINE_IMAGES', TRUE);
}
else{
DEFINE ('INLINE_IMAGES', FALSE);
}
if( getCfgVal("javascript_checking") == 1){
DEFINE ('JAVASCRIPT_CHECKING', TRUE);
}
else{
DEFINE ('JAVASCRIPT_CHECKING', FALSE);
}

if( !isset($_GET['id']) || $_GET['id'] == ""){
$getSets = mysql_query("SELECT * FROM sets ORDER BY id");
?>
<div class="pagehead big">Questions</div>
<form name="getquestions" action="<?= $_SERVER['PHP_SELF'] ?>" method="get">
<div class="pagehead"><?=getlang("questionselectquestionset",1)?></div>
<select name="id">
<option value=""><?=getlang("questionselectaset",1)?></option>
<?php
while($agetSets = mysql_fetch_array($getSets)){
	echo "<option value=\"".$agetSets['id']."\">".$agetSets['id'].". ".$agetSets['name']."</option>";
}
?>
</select>
<input type="submit" value="<?=getlang("questionselect",1)?>" />
</form>
<?php
createTail();
exit;
}

$no = $_GET['id'];

if( isset($_POST['rating']) && $_POST['rating'] != ""){
mysql_query("SELECT * FROM ratings WHERE userid='".user2id(USERNAME)."' AND setid='".$no."'");
if( mysql_affected_rows() >= 1){
	geterror("questionratedbefore");
}
mysql_query("INSERT INTO ratings SET userid='".user2id(USERNAME)."', setid='".$no."', rating='".$_POST['rating']."'");
getok("questionratingsubmitted");
exit;
}

$submitted = "";
$quesReport = getlang("questionmailanswers",1)."\n";
$quesRight = "";
$quesWrong = "";
if(isset($_POST['submitted'])){
$submitted = $_POST['submitted'];
$points = 0;
}

//::
//::Error Checking
//::
$qcheck = mysql_fetch_array(mysql_query("SELECT COUNT(*) as numfound FROM sets WHERE id='".$no."'"));
$qncheck = mysql_fetch_array(mysql_query("SELECT COUNT(*) as numfound FROM questions WHERE setid='".$no."'"));
$qnnos = $qncheck['numfound'];
$setcheck = mysql_fetch_array(mysql_query("SELECT * FROM sets WHERE id='".$no."'"));
$userid = mysql_fetch_array(mysql_query("SELECT * FROM users WHERE user='".USERNAME."'"));
$userid = $userid['id'];
$tries = mysql_fetch_array(mysql_query("SELECT COUNT(*) as numfound FROM statistics WHERE setid='".$no."' AND userid='".$userid."'"));
if($qcheck['numfound'] < 1){
geterror("questioninvalidset");
}
if($qncheck['numfound'] < 1){
geterror("questionnoquestions");
}
if($setcheck['isopen'] == 0){
geterror("questionsetclosed");
}
if($setcheck['tries'] != 0){
if($tries['numfound'] >= $setcheck['tries']){
	geterror("questionmaximumtries");
}
}

$qset = mysql_query("SELECT * FROM sets WHERE id='".$no."'");
$qset = mysql_fetch_array($qset);

if($setcheck['password'] != ""){
if( !isset($_POST['password']) || ($_POST['password'] != $setcheck['password']) ){
	?>
	<form name="pwCheck" action="<?= $_SERVER['PHP_SELF'] ?>?id=<?=$no?>" method="post">
	<div class="pagehead"><span class="big"><b><?=getlang("questionpasswordheader",1)?></b></span></div>
	<b><?=getlang("questionpasswordrequest",1)?>.</b><br />
	<?=getlang("questionpassword",1)?> <input type="password" name="password" />
	<input type="submit" value="<?=getlang("questionpasswordsubmit",1)?>" />
	</form>
	<?php
	exit;
}
}

if($setcheck['description'] != ""){
if( !isset($_POST['description']) || $_POST['description'] != 1 ){
	?>
	<div class="pagehead"><span class="big"><b><?=getlang("questiondescription",1)?><?= $setcheck['name'] ?></b></span></div>
	<form name="descCheck" action="<?= $_SERVER['PHP_SELF'] ?>?id=<?=$no?>" method="post">
	<table>
	<tr>
	<td class="ltext"><b><?=getlang("questioninstructions",1)?></b></td>
	<td class="rtext"><?= nl2br($setcheck['description']) ?></td>
	</tr>

	<tr>
	<td class="ltext"><b><?=getlang("questiondisplayanswers",1)?></b></td>
	<td class="rtext">
	<?php
	if($setcheck['answeron'] == 1){
		echo "Yes";
	}
	else{
		echo "No";
	}
	?>
	</td>
	</tr>

	<tr>
	<td class="ltext"><b><?=getlang("questiontimelimit",1)?></b></td>
	<td class="rtext">
	<?php
	if($qset['timeset'] != 0){
		echo $setcheck['timeset']." seconds";
		echo " (~".round($setcheck['timeset']/60)." minutes)";
	}
	else{
		echo getlang("questiontimeunlimited",1);
	}
	?>
	</td>
	</tr>

	<tr>
	<td class="submit" colspan="2">
	<input type="hidden" name="password" value="<?=$setcheck['password']?>" />
	<input type="hidden" name="description" value="1" />
	<input type="submit" value="<?=getlang("questionquizstart",1)?>" style="font-size: larger;" /></div>
	</td>
	</tr>
	</table>
	</form>
	<?php
	createTail();
	exit;
}
}

if( $qset['timeset'] != 0 && $submitted != 1){
?>
<script language="javascript">
var timerDown = new Number();
var timerDown = <?=$qset['timeset']?>;
var timeremaining;
alert("<?=getlang("questionstarttest",1)?>");
setTimeout("startCountdown()",1000);
function startCountdown(){
if(timerDown==0){
	numberCountdown.innerText = "<?=getlang("questionendtest",1)?>";
	timerDown = -1;
	document.forms[0].reset();
	document.forms[0].submit();
}
if((timerDown - 1) >= 0){
	timerDown = timerDown - 1;
	timeremaining = "Time Remaining: "+timerDown+" seconds";
	numberCountdown.innerText = timeremaining;
	window.status = timeremaining;
	setTimeout("startCountdown()",999);
}
}
</script>
<?php
}

$phpself = $_SERVER['PHP_SELF'];
$o_setname = $qset['name'];
$o_setcreator = $qset['creator'];
$o_description = $qset['description'];
$o_answeron = "";
if($qset['answeron'] == 1){
$o_answeron = "<b>".getlang("questiondisplayanswers",1)."</b> On   ";
}
else{
$o_answeron = "<b>".getlang("questiondisplayanswers",1)."</b> Off   ";
}
$o_timeleft = "";
if($qset['timeset'] != 0){
$o_timeleft = "<b>".getlang("questiontimelimit",1)."</b> ".$qset['timeset']." seconds<br />";
}
else{
$o_timeleft = "<b>".getlang("questiontimelimit",1)."</b> ".getlang("questiontimeunlimited",1)."<br />";
}

//Output Questions Header
eval("echo \"".stripslashes(getTemplate("question_header"))."\";");

//echo '<input type="hidden" name="password2" value="'.base64_encode($setcheck['password']).'" />';
echo '<input type="hidden" name="password" value="'.$setcheck['password'].'" />';
echo '<input type="hidden" name="description" value="1" />';

$ordering = "";
switch ( $qset['questionorder'] ){
case "1":
	break;
case "2":
	$ordering = "ORDER BY id DESC";
	break;
case "3":
	$ordering = "ORDER BY question";
	break;
case "4":
	$ordering = "ORDER BY question DESC";
	break;
case "5":
	mysql_query("SELECT * FROM questions WHERE setid='".$no."'");
	$order_limit = mysql_num_rows();
	$ordering = "ORDER BY RAND() LIMIT ".$order_limit;
	break;
default:
	break;
}

if($qset['questionnumber'] != 0){
$ordering = "ORDER BY RAND()";
}

$question = mysql_query("SELECT * FROM questions WHERE setid='".$no."' $ordering");

$submitvalue = "";
if($submitted == 1){
$submitvalue = "disabled=\"disabled\"";
}

$javascriptcheck = "";

$i = 0;
$j = 1;
while($aquestion = mysql_fetch_array($question) ){
if($qset['questionnumber'] != 0 && $j-1 == $qset['questionnumber']){
	break;
}
$i = $aquestion['id'];
$type = "N/A";
if( $aquestion['ismcq'] == 1 ){
	if( $aquestion['ismultiple'] == 1 ){
		$type = "Multiple Selection";
	}
	else{
		$type = "Single Selection";
	}
}
else{
	$type = "Short Answer";
}
$o_question = nl2br($aquestion['question']);
$o_image = "";
if($aquestion['image'] != "" && !INLINE_IMAGES){
	$o_image = '<span class="indent">';
	$o_image .= '<a href="viewimage'.PHPEX.'?id='.$aquestion['id'].'" target="_blank"><img src="img/image.png" alt="Image">';
	$o_image .= '<img src="viewimage'.PHPEX.'?id='.$aquestion['id'].'" alt="'.getlang("questionimagenlarge",1).'" height="10" width="10"/>';
	$o_image .= '</a>';
	$o_image .= '</span>';
}
eval("echo \"".getTemplate("question_bit_top")."\";");

if( $aquestion['image'] != "" && INLINE_IMAGES){
	?>
	<b>Image:</b><br />
	<img src="viewimage<?=PHPEX?>?id=<?=$aquestion['id']?>" alt="Picture" /><br />
	<?php
}

if( $aquestion['ismcq'] == 1 ){
	if( $aquestion['ismultiple'] == 1 ){
		$theFormat = 'checked="checked"';
		$mcq1 = ""; $mcq2 = ""; $mcq3 = ""; $mcq4 = ""; $mcq5 = "";
		if($_POST["qns1$i"] == 1){
			$mcq1 = $theFormat;
		}
		if($_POST["qns2$i"] == 2){
			$mcq2 = $theFormat;
		}
		if($_POST["qns3$i"] == 3){
			$mcq3 = $theFormat;
		}
		if($_POST["qns4$i"] == 4){
			$mcq4 = $theFormat;
		}
		if($_POST["qns5$i"] == 5){
			$mcq5 = $theFormat;
		}

		//Output Questions
		if($aquestion['sol1'] != ""){
			?>
			<input type="checkbox" name="qns1<?= $i ?>" value="1" <?= $mcq1 ?> <?= $submitvalue ?>><b>1. </b><?= $aquestion['sol1'] ?><br />
			<?php
		}
		if($aquestion['sol2'] != ""){
			?>
			<input type="checkbox" name="qns2<?= $i ?>" value="2" <?= $mcq2 ?> <?= $submitvalue ?>><b>2. </b><?= $aquestion['sol2'] ?><br />
			<?php
		}
		if($aquestion['sol3'] != ""){
			?>
			<input type="checkbox" name="qns3<?= $i ?>" value="3" <?= $mcq3 ?> <?= $submitvalue ?>><b>3. </b><?= $aquestion['sol3'] ?><br />
			<?php
		}
		if($aquestion['sol4'] != ""){
			?>
			<input type="checkbox" name="qns4<?= $i ?>" value="4" <?= $mcq4 ?> <?= $submitvalue ?>><b>4. </b><?= $aquestion['sol4'] ?><br />
			<?php
		}
		if($aquestion['sol5'] != ""){
			?>
			<input type="checkbox" name="qns5<?= $i ?>" value="5" <?= $mcq5 ?> <?= $submitvalue ?>><b>5. </b><?= $aquestion['sol5'] ?><br />
			<?php
		}

		if($submitted == 1){
			//Get $mcqAns
			$mcqAns = "";
			if($_POST["qns1$i"] == 1){
				$mcqAns = $mcqAns."1";
			}
			if($_POST["qns2$i"] == 2){
				$mcqAns = $mcqAns."2";
			}
			if($_POST["qns3$i"] == 3){
				$mcqAns = $mcqAns."3";
			}
			if($_POST["qns4$i"] == 4){
				$mcqAns = $mcqAns."4";
			}
			if($_POST["qns5$i"] == 5){
				$mcqAns = $mcqAns."5";
			}
			//Check $mcqAns
			if($mcqAns == $aquestion['solution']){
				if($qset['answeron'] == 1){
					q_right();
				}
				$points++;
				$quesRight .= " $i";
			}
			else{
				if($qset['answeron'] == 1){
				q_wrong();
				$therightquestions = preg_split('//', $aquestion['solution'], -1, PREG_SPLIT_NO_EMPTY);
				getlang("questionlookingfor",2);
				$rightcount = 0;
				while($rightcount < count($therightquestions)){
					echo $therightquestions[$rightcount]." ";
					$rightcount++;
				}
				echo "<br />";
				if($aquestion['solexp'] != ""){
					echo '<br />';
					echo '<span class="small">'.getlang("questionexplanation",1).$aquestion['solexp'].'</span>';
				}
				$quesWrong .= " $i";
				}
			}
			if(isset($_POST['emailResults']) && $_POST['emailResults'] == 1 && $qset['answeron'] == 1){
				$quesReport .= "Question $i (".$aquestion['question']."), the answer was ".$aquestion['solution']." (".$aquestion['solexp'].")\n";
			}
		}
	}
	else{
		$theFormat = 'checked="checked"';
		$mcq1 = ""; $mcq2 = ""; $mcq3 = ""; $mcq4 = ""; $mcq5 = "";
		if( isset($_POST["qn$i"])){
		switch ($_POST["qn$i"]){
			case 1:
				$mcq1 = $theFormat;
				break;
			case 2:
				$mcq2 = $theFormat;
				break;
			case 3:
				$mcq3 = $theFormat;
				break;
			case 4:
				$mcq4 = $theFormat;
				break;
			case 5:
				$mcq5 = $theFormat;
				break;
			default:
				break;
		}
		}

		//Output Question
		if($aquestion['sol1'] != ""){
			?>
			<input type="radio" name="qn<?= $i ?>" value="1" <?= $mcq1 ?> <?= $submitvalue ?>><b>1. </b><?= $aquestion['sol1'] ?><br />
			<?php
		}
		if($aquestion['sol2'] != ""){
			?>
			<input type="radio" name="qn<?= $i ?>" value="2" <?= $mcq2 ?> <?= $submitvalue ?>><b>2. </b><?= $aquestion['sol2'] ?><br />
			<?php
		}
		if($aquestion['sol3'] != ""){
			?>
			<input type="radio" name="qn<?= $i ?>" value="3" <?= $mcq3 ?> <?= $submitvalue ?>><b>3. </b><?= $aquestion['sol3'] ?><br />
			<?php
		}
		if($aquestion['sol4'] != ""){
			?>
			<input type="radio" name="qn<?= $i ?>" value="4" <?= $mcq4 ?> <?= $submitvalue ?>><b>4. </b><?= $aquestion['sol4'] ?><br />
			<?php
		}
		if($aquestion['sol5'] != ""){
			?>
			<input type="radio" name="qn<?= $i ?>" value="5" <?= $mcq5 ?> <?= $submitvalue ?>><b>5. </b><?= $aquestion['sol5'] ?><br />
			<?php
		}

		if($submitted == 1){
			//Check Answer
			$mcqAns = substr($aquestion['solution'],0,1);
			if($_POST["qn$i"] == $mcqAns){
				if($qset['answeron'] == 1){
				q_right();
				}
				$points++;
				$quesRight .= " $i";
			}
			else{
				if($qset['answeron'] == 1){
				q_wrong();
				echo getlang("questionlookingfor",1).$aquestion['solution'];
				if($aquestion['solexp'] != ""){
					echo '<br />';
					echo '<span class="small">'.getlang("questionexplanation",1).$aquestion['solexp'].'</span>';
				}
				$quesWrong .=  " $i";
				}
			}
			if(isset($_POST['emailResults']) && $_POST['emailResults'] == 1 && $qset['answeron'] == 1){
				$quesReport .= "Question $i (".$aquestion['question']."), the answer was ".$aquestion['solution']."(".$aquestion['solexp'].")\n";
			}
		}
	}
}
else{
	$sa = "";
	if($_POST["qn$i"] != ""){
		$sa = $_POST["qn$i"];
	}
	?>
	<input type="text" name="qn<?= $i ?>" value="<?= $sa ?>" size="60" maxlength="500" <?= $submitvalue ?>>
	<?php
	if($submitted == 1){
		//Check Answer
		$saAns = strtoupper($_POST["qn$i"]);
		$check1 = 0;
		$check2 = 0;
		$check3 = 0;
		$check4 = 0;
		$check5 = 0;
		if($aquestion['sol1'] != "" && substr_count($saAns,$aquestion['sol1']) >= 1){
			$check1 = 1;
		}
		if($aquestion['sol2'] != "" && substr_count($saAns,$aquestion['sol2']) >= 1){
			$check2 = 1;
		}
		if($aquestion['sol3'] != "" && substr_count($saAns,$aquestion['sol3']) >= 1){
			$check3 = 1;
		}
		if($aquestion['sol4'] != "" && substr_count($saAns,$aquestion['sol4']) >= 1){
			$check4 = 1;
		}
		if($aquestion['sol5'] != "" && substr_count($saAns,$aquestion['sol5']) >= 1){
			$check5 = 1;
		}
		if($aquestion['isoe'] == 1){
			if($check1==1||$check2==1||$check3==1||$check4==1||$check5==1){
				q_right();
				$points++;
				$quesRight .= " $i";
			}
			else if($qset['answeron'] == 1){
				q_wrong();
				$quesWrong .= " $i";
				echo getlang("questionlookingfor",1).$aquestion['sol1'].' '.$aquestion['sol2'].' '.$aquestion['sol3'].' '.$aquestion['sol4'].' '.$aquestion['sol5'];
				if($aquestion['solexp'] != ""){
					echo '<br />';
					echo '<span class="small">'.getlang("questionexplanation",1).$aquestion['solexp'].'</span>';
				}
			}
		}
		else{
			$varChk = 1;
			if($aquestion['sol1'] != "" && $check1 != 1){
				$varChk = 0;
			}
			if($aquestion['sol2'] != "" && $check2 != 1){
				$varChk = 0;
			}
			if($aquestion['sol3'] != "" && $check3 != 1){
				$varChk = 0;
			}
			if($aquestion['sol4'] != "" && $check4 != 1){
				$varChk = 0;
			}
			if($aquestion['sol5'] != "" && $check5 != 1){
				$varChk = 0;
			}
			if( $varChk == 1 ){
				if($qset['answeron'] == 1){
					q_right();
				}
				$points++;
				$quesRight .= " $i";
			}
			else if($qset['answeron'] == 1){
				q_wrong();
				$quesWrong .= " $i";
				echo getlang("questionlookingfor",1).$aquestion['sol1'].' '.$aquestion['sol2'].' '.$aquestion['sol3'].' '.$aquestion['sol4'].' '.$aquestion['sol5'];
				if($aquestion['solexp'] != ""){
					echo '<br />';
					echo '<span class="small">'.getlang("questionexplanation",1).$aquestion['solexp'].'</span>';
				}
			}
		}
		if(isset($_POST['emailResults']) && $_POST['emailResults'] == 1 && $qset['answeron'] == 1){
			$quesReport .= "Question $i (".$aquestion['question']."), the answers were ".$aquestion['sol1']." ".$aquestion['sol2']." ".$aquestion['sol3']." ".$aquestion['sol4']." ".$aquestion['sol5']."(".$aquestion['solexp'].")\n";
		}
	}
	elseif(JAVASCRIPT_CHECKING){
		$javascriptcheck .= "if(document.forms[0].qn$i.value == \"\"){ alert(\"Question $i was not filled in\"); document.forms[0].qn$i.focus();}\n";
	}
}
eval("echo \"".getTemplate("question_bit_footer")."\";");
$j++;
}

//Output Questions Footer
$noblanks = "";
if(JAVASCRIPT_CHECKING){
$noblanks = "<script language=\"javascript\" type=\"text/javascript\">\nfunction checkBlanks(){\n$javascriptcheck\nalert(\"Question Checking Done.\");\n}\n</script>\n<input type=\"button\" value=\"Check for Blanks\" onclick=\"checkBlanks()\" />";
}
eval("echo \"".getTemplate("question_footer")."\";");

if($submitted == 1){
echo "<table style=\"background-color: #CCCCCC;\"><tr><td class=\"ltext\" style=\"border-right: 2pt solid black;\"><span class=\"big\"><b>";
echo "Total:";
if($points != ""){
	echo $points;
}
else{
	echo "0";
}
echo "/";
echo $qnnos;
$percentile = round($points/$qnnos*100);
echo "(".$percentile."%)";
echo "</b></span>";
echo "</td><td class=\"rtext\" style=\"border-left: 2pt solid black;\">";
echo "<img src=\"scoregfx.php?ts=".base64_encode($qset['name'])."&nm=".base64_encode(USERNAME)."&px=".base64_encode($percentile)."\" alt=\"Right-Click To Save the Picture!\">";
echo "</td></tr></table>";
?>
<div class="small" style="border: 1px solid #EEEEEE; padding: 2px;">
<?php
if( trim($qset['passpercent']) != "" ){
	?>
	<div class="medium" style="background-color: #EEEEEE;" align="center"><b><?=getlang("questionpassinformation",1)?></b></div>
	<?php
	if($percentile >= $qset['passpercent']){
		echo getlang("questionpassed",1).$qset['passpercent'].".<br />";
		echo $qset['passinfo'];
		echo "<br /><br />";
		$quesReport .= getlang("questionpassed2")."\n";
		$quesReport .= $qset['passinfo']."\n";
	}
	else{
		echo getlang("questionfailed",1).$qset['passpercent'];
		echo "<br /><br />";
		$quesReport .= getlang("questionfailed2")."\n";
	}
}
?>
<div class="medium" style="background-color: #EEEEEE;" align="center"><b><?=getlang("questionactions",1)?></b></div>
<form name="rateQS" action="<?=$_SERVER['PHP_SELF']?>?id=<?=$no?>" method="post">
<b><?=getlang("questionrate")?></b>
<select name="rating">
<option value="5">Excellent</option>
<option value="4">Good</option>
<option value="3">Average</option>
<option value="2">Fair</option>
<option value="1">Poor</option>
</select>
<input type="submit" value="Rate!" /><br />
<a href="statistics.php?id=<?=$no?>"><?=getlang("questionstatisticsview",1)?></a><br />
<a href="comments.php?id=<?=$no?>"><?=getlang("questionscommentsview",1)?></a><br />
<a href="report<?= PHPEX ?>?type=qerror&id=<?= $no ?>"><?=getlang("questionsreporterror",1)?></a><br />
<a href="report<?= PHPEX ?>?type=qrecommend&id=<?= $no ?>"><?=getlang("questionsrecommend",1)?></a>
</form>
</div>
<?php
mysql_query("INSERT INTO statistics SET setid='".$no."', userid='".user2id(USERNAME)."', score='".$points."', totalscore='".$qnnos."', rquestions='".$quesRight."', wquestions='".$quesWrong."'");
getok("questionstatisticssubmitted");
}
if(isset($_POST['emailResults']) && $_POST['emailResults'] == 1 && $user['e-mail'] != "@"){
$message = "To ".USERNAME.",\n";
$message .= "Thank You For Taking Part in the Quiz aforementioned in the subject header!\n";
$message .= $quesReport;
$message .= "\nYour score was $qnnos and you got a percentile of $percentile.\n";
$message .= "Visit ".WPURL."/statistics".PHPEX."?id=".$no." to view the statistics for this quiz, or visit ".WPURL."/questions".PHPEX."?id=".$no." to try again!\n";
$message .= "Regards, the webmaster at $title";
$message .= "\nThis is a automatically generated message, and was sent at the request of ".USERNAME." at the IP Address ".$_SERVER['REMOTE_ADDR'].".\n";
$message .= "Date/Time: ".date("d F Y - h:i:s A");
$userEmail = mysql_fetch_array(mysql_query("SELECT * FROM users WHERE user='".USERNAME."'"));
$userEmail = $userEmail['email'];
mail($userEmail, $title." ".$qset['name']." Report", $message, "From: no-reply@".BASEURL."\r\n"."Reply-To: no-reply@".BASEURL."\r\n"."X-Mailer: PHP/".phpversion());
getok("questionreportmailed");
}
createTail();
?>

 

really hope that anyone could help me make this exam timer up

 

Link to comment
https://forums.phpfreaks.com/topic/135718-my-script-not-working/
Share on other sites

err no basically no errors but i need it to like pop up and say hey your times up please proceed to your marked questions

 

and you can see a sample here

 

http://www.baddot.com/quiz/index.php

 

username admin

password admin

 

when u logged in it will show a test paper

 

when i clicked on set a

 

i will then go to the page where by it says Description for set A and time limit and etc

 

so when i start the quiz

 

it goes to the quiz page and the time limit: 2 seconds just stucked there and it wont move at all

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

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.