I have made a form that sends an email, and a form that checks whether required fields have been filled out. Both works but when combinded it doesn't. I was hoping somebody here could tell me what I am doing wrong here.
this one checks for required fields
http://www.fransgaard.net/php/form01.php
this one sends email
http://www.fransgaard.net/php/form02.php
This one is both combined, but doesn't work
http://www.fransgaard.net/php/form03.php
This is the code for the last form:
Code: Select all
<?php
if (! isset ($your_message))
$my_message = "";
elseif ($your_message <> "")
if ($tlf <> "" || $email <> "")
$my_message = "Thanks for your email";
// bit that is sent off to my mail
$to = "robert@fransgaard.com";
$msg .= "$your_message\n\n";
mail($to, "To me", $msg, "Fra $name\n Reply-To: $email \n");
//
else
$my_message = "I need your phone or email";
elseif ($your_message == "")
$my_message ="Don't you want to say something ?";
?>
<html>
<head>
...