Posted by Jeff on 01/15/07 01:28
hey
php 5.2.0
I have problem with the code below. I haven't entered any values in the
secretAnswer input field, so when I submit the form the if test (see below)
isn't executed... I thought at least it should print out "no value".. but
nothing is echoed to the screen...
Any suggestions?
<td align="right" style="width:40%;">
<label for="secretAnswer">Hemmelig svar:</label>
</td>
<td style="width:60%;">
<input type="text" name="secretAnswer" id="secretAnswer" /> *
</td>
$secretAnswer = $_POST["secretAnswer"];
if (isset($secretAnswer)) {
echo $secretAnswer;
} else {
echo "no value";
}
[Back to original message]
|