How can I use PHP to raise an error if this particular value is selected?
<option>Please Select</option>
How can I use PHP to raise an error if this particular value is selected?
<option>Please Select</option>
You can try this:
HTML
<select name="selectoption">
<option value="">Please Select</option>
</select>
PHP
if (isset($_POST['selectoption']) && $_POST['selectoption'] == '' ) {
echo 'Error, select an options';
exit;
}