Handling errors on php contact form

Posted by topSearchDesign on Stack Overflow See other posts from Stack Overflow or by topSearchDesign
Published on 2010-04-04T22:36:48Z Indexed on 2010/04/04 22:43 UTC
Read the original article Hit count: 227

Filed under:
|

The below code is working great for handling errors for text fields in my contact form, but how do I get this same method to work for dropdown select option boxes and textareas?

<input type="text" name="name" value="<?php if($errors){echo $name;} ?>" id="name" size="30" />

For example:

<textarea name="message" value="<?php if($errors){echo $message;} ?>" id="message" rows="10" cols="40"></textarea>

does not work.

© Stack Overflow or respective owner

Related posts about error-handling

Related posts about php