'Require' and 'Select' lists

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 &nbsp;</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

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux