Hello! My script is supposed not to let the HTML form be submitted unless a user enters some data into a textarea control. However, the form gets submitted anyway and no message for the user is displayed. Could anyone see what I'm doing wrong?
Here is my HTML:
<textarea name="description" id="description" rows = "4" cols = "25">
<?php echo $description?>
</textarea>
As for PHP, neither this:
if ($_POST['description'] == "") {
$errors .= 'Please enter a description of your invention.<br/><br/>';
}
or this:
if (empty($_POST['description'])) {
$errors .= 'Please enter a description of your invention.<br/><br/>';
}
work.