| Article: |
PHP Form Handling | |
| Subject: | Display selected value in radio buttons when previous button is clicked | |
| Date: | 2008-04-24 12:34:16 | |
| From: | radice | |
|
Response to: Display selected value in radio buttons when previous button is clicked
|
||
|
Sorry. Here is the correct code. // This displays Question 0 function displayQuestionOne() { $answer = $_SESSION['answerArray'][0]; echo "Answer".$answer; $choice1 = $choice2 = $choice3 = $choice4 = ''; if ($answer == "Opens") $choice1='checked'; if ($answer == "Opened") $choice2='checked'; if ($answer == "Open") $choice3='checked'; if ($answer == "will opened") $choice4='checked'; echo "Choice 1".$choice1." "; echo "Choice 2".$choice2." "; echo "Choice 3".$choice3." "; echo "Choice 4".$choice4." ";
Select the correct answer </td><td width="13%"> </td> </tr> <tr> <td width="7%">1.</td> <td colspan="2">Maria, ____________the door please. It’s too hot in here.</td> <td> </td> </tr>
<td> </td> </tr> <?
|
||
Women in Technology
Hear us Roar
