Hi I built this simple contactform on my webpage www.kraghkrogh.dk using [URL=“http://www.kirupa.com/developer/actionscript/flash_php_email.htm”]this tutorial. What i need to add now is some kind of error message if the inputboxes hasn’t been filled out properly. So i figured it could work by jumping to a new frame with an errorline, if one of the following things happen:
- no text in the name field.
- no text in the message field.
- the emails syntax is not name@domain.x
Im a terrible coder so i hope someone can help me out adding the code :evil2: Here is the code i’ve used so far in the php script:
<?php
$sendTo = "wereallinittogether@gmail.com";
$subject = "Reply from kraghkrogh.dk";
$headers = "From: " . $_POST["firstName"] ." ". $_POST["lastname"] . "<" . $_POST["email"] .">
";
$headers .= "Reply-To: " . $_POST["email"] . "
";
$headers .= "Return-path: " . $_POST["email"];
$message = $_POST["message"];
mail($sendTo, $subject, $message, $headers);
?>