Hi
I have made this webpage [url]http://www.ingham-sejlerskole.dk/test2.php
My probleme is that the text that shows up, when the OK button is clicked disappears when going to the next question. How do I make the text remain visible after the question?
My php code is:
[code=php]
<form name=”form1″ method=”GET” action=”test2.php”>
<table width=”100%” border=”0″ cellspacing=”0″ cellpadding=”0″>
<?php do { ?>
<tr>
<td width=”11%” scope=”row”><?php echo $row_rs[‘id’]; ?></td>
<td width=”38%”><?php echo $row_rs[‘question’]; ?></td>
<td width=”18%”><select name=”svar” id=”svar”>
<option value=”<?PHP echo $row_rs[‘mulighed1’];?>”><?PHP echo $row_rs[‘mulighed1’];?></option>
<option value=”<?PHP echo $row_rs[‘mulighed2’];?>”><?PHP echo $row_rs[‘mulighed2’];?></option>
<option value=”<?PHP echo $row_rs[‘mulighed3’];?>”><?PHP echo $row_rs[‘mulighed3’];?></option>
</select> </td>
<td width=”7%”><input name=”id” type=”hidden” id=”id” value=”<?PHP echo $row_rs[‘id’]; ?>+1″>
<input name=”submit” type=”submit” id=”submit” value=”OK”></td>
<td width=”26%”>
<span class=”style3″>
<?PHP
if (($_GET[‘submit’] == “OK”) && ($_GET[‘svar’] == $row_rs[‘rigtig’]) && ($_GET[‘id’] == $row_rs[‘id’]+”%2B1″)) {
echo $row_rs[‘tekst_sand’];}?>
</span> <span class=”style1″>
<?PHP
if (($_GET[‘submit’] == “OK”) && ($_GET[‘svar’] != $row_rs[‘rigtig’]) && ($_GET[‘id’] == $row_rs[‘id’]+”%2B1″)) {
echo $row_rs[‘tekst_falsk’];
}
?>
</span></td>
</tr>
<?php } while ($row_rs = mysql_fetch_assoc($rs)); ?>
</table>
</form>
Cheers!
Dennis