[PHP] Odd Behaviour: DIE function
I've noticed some strange behaviour with respect to validation of user input. Normally, using Linux, the die function in user input validation works as expected. However, the same code in IE, the DIE function does not work as expected. I've noticed that fields, that should die and barf an error message, seem to allow no input. Often, I notice that the user has entered a different spelling as well. I'm puzzled by this (Furthermore, I wasn't aware the user could change the contents of a dropdown select list [I cannot duplicate it in Linux). Since one of the affected fields receives its input from an included file (provcountry.dpn), perhaps this ius an IE issue?? provcountry.dpn tdbCountry nbsp;/b/td tdSELECT NAME=rcountry option selectedChoose from List OPTIONUSA /* list of countries follows */ snippet code in validation page: ?php ... if ($_POST['rcountry'] == Choose from List) die (h5brbrPlease choose your Country from the drop-down listbrbrbrClick 'Back' on your browser to enter this information/h5); ... ? Any pointers of what I'm missing here would be appreciated. Tia, Andre -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Odd Behaviour: DIE function
Andre Dubuc wrote: I've noticed some strange behaviour with respect to validation of user input. Normally, using Linux, the die function in user input validation works as expected. However, the same code in IE, the DIE function does not work as expected. I've noticed that fields, that should die and barf an error message, seem to allow no input. Often, I notice that the user has entered a different spelling as well. I'm puzzled by this (Furthermore, I wasn't aware the user could change the contents of a dropdown select list [I cannot duplicate it in Linux). Since one of the affected fields receives its input from an included file (provcountry.dpn), perhaps this ius an IE issue?? provcountry.dpn tdbCountry nbsp;/b/td tdSELECT NAME=rcountry option selectedChoose from List OPTIONUSA /* list of countries follows */ snippet code in validation page: ?php ... if ($_POST['rcountry'] == Choose from List) die (h5brbrPlease choose your Country from the drop-down listbrbrbrClick 'Back' on your browser to enter this information/h5); ... ? Any pointers of what I'm missing here would be appreciated. Tia, Andre the option-element needs an ending-element. optionvalue/option Some browsers may include a space at the end of the string. I think this is the most correct syntax: option value=somethingText to show/option where something is what is sent as value when posting. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php