Please help me in my code (urgent)
Posted: Thu Mar 13, 2008 10:20 am
Everah | Please use the appropriate bbCode tags when posting code in the forms. You can use [code], [{lang}] or [syntax="{lang}"] where {lang} is the language you want to highlight as.
Everah | Please post in the correct forums. PHP Coding questions should be posted in the PHP - Code forums, not General Discussion.
Everah | Please do not post that your problem is urgent. All problems around here are urgent and the folks that volunteer their time here to help you will get to your problem as soon as they can
Good day,
Please help me in my code. i'm using wamp5. when i'm just refreshing the browser everything is ok but when i close my browser and open it again to see my work everything is gone.
here is my code:
please help me with my code thanks.
i badly need this, presentation of prototypes in our school is next week.
please help me
Everah | Please use the appropriate bbCode tags when posting code in the forms. You can use [code], [{lang}] or [syntax="{lang}"] where {lang} is the language you want to highlight as.
Everah | Please post in the correct forums. PHP Coding questions should be posted in the PHP - Code forums, not General Discussion.
Everah | Please do not post that your problem is urgent. All problems around here are urgent and the folks that volunteer their time here to help you will get to your problem as soon as they can
Good day,
Please help me in my code. i'm using wamp5. when i'm just refreshing the browser everything is ok but when i close my browser and open it again to see my work everything is gone.
here is my code:
Code: Select all
<?
$db = mysql_connect("localhost");
mysql_select_db("examination",$db);
if (isset($_POST['Submit'])) {
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>dummy</title>
</head>
<body>
<?
echo '<FORM name ="form1" method ="post" action ="dummy.php">
<table width="800" border="0" align="center" class="underresult">';
$query = "SELECT *
FROM logicQuestions";
$result = mysql_query($query);
for($i = 0; $i < mysql_num_rows($result); $i++){
$question_number_logic ++;
$question = mysql_result($result, $i, "question");
$choiceA = mysql_result($result, $i, "choiceA");
$choiceB = mysql_result($result, $i, "choiceB");
$choiceC = mysql_result($result, $i, "choiceC");
$choiceD = mysql_result($result, $i, "choiceD");
$answer = mysql_result($result, $i, "answer");
echo '<tr>
<td></td>';
'</tr>';
echo '<tr>
<td> </td>';
'</tr>';
echo '<tr>
<td width = "20" align = "left" valign = "top"><font class = "questions">'.$question_number_logic.'.</span><td>';
echo '<td width = "280" align = "left" valign = "top" ><font class = "questions">'.$question.'</span></td>';
echo '<td width = "125" align = "left" valign = "center" > </td>';
echo '<td width = "125" align = "left" valign = "center" > </td>';
echo '<td width = "125"align = "left" valign = "center" > </td>';
echo '<td width = "125" align = "left" valign = "center" > </td></tr>';
echo '<tr>
<td> </td>';
'</tr>';
echo '<tr>
<td width = "20" align = "left" valign = "top"><td>';
echo '<td width = "280" align = "left" valign = "center" > </td>';
echo '<td width = "125" align = "left" valign = "center" ><font class = "style1"><input name="'.$question_number_logic.'" type="radio" value="'.$choiceA.'" />'.$choiceA.'</span></td>';
echo '<td width = "125" align = "left" valign = "center" ><font class = "style1"><input name="'.$question_number_logic.'" type="radio" value="'.$choiceB.'" />'.$choiceB.'</span></td>';
echo '<td width = "125"align = "left" valign = "center" ><font class = "style1"><input name="'.$question_number_logic.'" type="radio" value="'.$choiceC.'" />'.$choiceC.'</span></td>';
echo '<td width = "125" align = "left" valign = "center" ><font class = "style1"><input name="'.$question_number_logic.'" type="radio" value="'.$choiceD.'" />'.$choiceD.'</span></td></tr>';
echo '<tr>
<td colspan = "7" class = "exam">'.$selected = $_POST[$question_number_logic];
if ($selected == $answer) {
$score++;
}
}' </td>
</tr>';
}
echo '</table>
<br /> total score is : '.$score.'<br />
<Input type = "Submit" Name = "Submit" VALUE = "Select a Radio Button">
</FORM>';
?>
</body>
</html>i badly need this, presentation of prototypes in our school is next week.
please help me
Everah | Please use the appropriate bbCode tags when posting code in the forms. You can use [code], [{lang}] or [syntax="{lang}"] where {lang} is the language you want to highlight as.