Aloha, I have created a simple tell a friend form. If the user click send without filling out all of the required fields, I show an error message and the form once more. My problem is that the contents of the form get cleared when I reload the form :( I would of course like to keep the contents, so the user doesn't get annoyed and leave my website without telling their friends. How do I keep the contents? Here is the complete (sigh...) code for my form: ------------------------------------------------------------------------ Please fill out this form and click send. <?php unset($message_sendername); unset($message_sender); unset($message_recipient); unset($message_subject); unset($message_text); // Get the image text and title $message_sendername = $_POST["message_sendername"]; $message_sender = $_POST["message_sender"]; $message_recipient = $_POST["message_recipient"]; $message_subject = $_POST["message_subject"]; $message_text = $_POST["message_text"]; // Validation if($_POST["action"] == "Send") { if(empty($message_sendername) == true || empty($message_sender) == true) { $error["message_sender"] = "Please write your own name or your own e-mail address."; } if(empty($message_recipient) == true) { $error["message_recipient"] = "Please write your friend's e-mail address."; } if(empty($error) == false) { unset($_POST["action"]); } } if($_POST["action"] == "Send") { $headers = "From: \"$message_sendername\"<$message_sender>\n"; // Send the e-mail mail($message_recipient, $message_subject, $message_text, $headers); print("<p>Your message has been sent to $message_recipient.<br/><br/><a href='/tell-a-friend'>Send another message</a></p>"); } else { // Show errors - if any if(is_array($error)) { print("Something went wrong:<br/><font color='#FF0000'>"); while(list($key, $val) = each($error)) { print("$val"); print("<br>\n"); } print("</font>"); } ?> <table> <tr><td width="10%"></td><td width="80%"> <form method="POST" enctype="multipart/form-data" name="tell_a_friend_form" action="<?$_SERVER["PHP_SELF"];?>" > <p>Your name: <input type="text" name="message_sendername" size="60" maxlength="60"></p> <p>Your e-mail address: <input type="text" name="message_sender" size="60" maxlength="60"></p> <p>Friend's e-mail address: <input type="text" name="message_recipient" size="60" maxlength="60"></p> <p>E-mail subject: <input type="text" name="message_subject" size="60" maxlength="60"></p> <p>E-mail text: <textarea name="message_text" rows="10" cols="45"></textarea></p> <p><input type="submit" value="Send" name="action"></p> </form> </td><td width="10%"></td> </tr> </table> <?php } ?> ------------------------------------------------------------------------ Thank you, Mads