/    Sign up×
Community /Pin to ProfileBookmark

To make a text remain visible?

Hi

I have made this webpage [url]http://www.ingham-sejlerskole.dk/test2.php[/url]

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>
[/code]

Cheers!
Dennis

to post a comment
PHP

0Be the first to comment 😎

×

Success!

Help @Dennis_Ingham spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.20,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...