Form Validation Script - Works with <input> tag but not <textarea> tag

I’m new to PHP, but I’m trying to get a simple form validation script to work for a contact page. The “required” fields should show an error if they are not filled out. For some reason it won’t work for the <textarea> element (message field). Since I’ve found out this element doesn’t allow for a value=“” attribute I put the script snippet between the textarea tags which doesn’t seem to work - unless I’m missing something somewhere else. I don’t know where else I’d put the statement. Here is a link to the page to give you a visual of what I’m talking about: http://www.sitekitchen.us/form

Here’s the script and the form:

<?php
// define variables and initialize with empty values
$nameErr = $emailErr = $feedbackErr = "";
$name = $email = $feedback = "";


if ($_SERVER["REQUEST_METHOD"] == "POST") {
    if (empty($_POST["name"])) {
        $nameErr = "Missing";
    }
    else {
        $name = $_POST["name"];
    }

    if (empty($_POST["email"]))  {
        $emailErr = "Missing";
    }
    else {
        $email = $_POST["email"];
    }

    if (!isset($_POST["feedback"])) {
        $feedbackErr = "Missing";
    }
    else {
        $feedback = $_POST["feedback"];
    }
	
}


?>
<form method="POST" action="<?php echo htmlspecialchars($_SERVER["PHP_SELF"]);?>">
		<fieldset>
		<div>
		
		<label>
		<span class="error"><?php echo $nameErr;?></span>
		<span>Your name</span> <span class="require">(required)</span><input type="text" name="name" value="<?php echo htmlspecialchars($name);?>" />
		
		</label>
		<label>
		<span class="error"><?php echo $emailErr;?></span>
		<span>Email Address</span> <span class="require">(required)</span><input type="text" name="email" value="<?php echo htmlspecialchars($email);?>" />
		
		</label>
		<label>
		<span>Website</span><input type="text" name="website" id="website" />
		</label>
		<label>
		<span>Subject</span><input type="text" name="subject"  id="subject" />
		</label>
		<label>
		<span class="error"><?php echo $feedbackErr;?></span>
<span>Message</span> <span class="require">(required)</span><textarea name="feedback" id="feedback"><?php echo htmlspecialchars($feedback);?></textarea>
		</label>
		<label>
		<input type="submit" name="submit" id="submit" class="button" value="Submit" />
		</label>					
		</div>
		</fieldset>
		<div>
		
		</div>
		</form>

The POST key “feedback” will always “be set” so change your error check to empty like the others.

That was it! Thanks a million Drummin. I learned a little something there. Thanks.