|
Posted by Andre Dubuc on 05/13/05 06:41
Hi,
I've had some rather odd intermittent behavior with a select list drawn by a
'require' on my production site. Sometimes, rather than displaying 'In
USA/Canada' from the '<option selected>In USA/Canada</option>' code in the
required file, it will display a blank. Yet, if I try to duplicate this
behavior on the development box, it will display as coded.
Since I use this text string as a validator for user input, it really messes
up the database/code functions that rely on it.
<?php require("provcountry.sty"); ?>
[snippet of 'require' text (provcountry.sty)]
<tr>
<td><b>State </b></td>
<td><SELECT NAME=selstate>
<option selected>In USA/Canada</option>
<option value="Alabama">Alabama</option>
.. . .
</SELECT></td>
</tr>
[snippet of some validating code verifying $selstate that relies on $selstate]
<?php
if (($_POST['selstate'] != "In USA/Canada")&&($_POST['typstate'] != ""))
die ("<h5><br><br>Please choose from 'In USA/Canada' or type in 'Other
State'.
<br>Do not use both<br><br>Click 'Back' on your browser to
re-enter information</h5>");
?>
Any ideas why this is happening?
Tia,
Andre
Navigation:
[Reply to this message]
|