Grafische beginner |
|
Jaja spandend zo'n topic
maar goed, ik heb em nu verbeterd:
<?php
$your_email = "an_alien@eugamer.com";
if($_POST['submit'])
{
$subject = $_POST['subject'];
$message = $_POST['message'];
$name = $_POST['name'];
$email = $_POST['email'];
if(!empty($name))
{
echo("You did not fill in your name! Your mail has not been send!");
}
elseif(!empty($email))
{
echo("You did not fill in your email! Your mail has not been send!");
}
elseif(!empty($subject))
{
echo("You did no fill in a subject! Your mail has not been send!");
}
elseif(!empty($message))
{
echo("You did not fill in a message! Your mail has not been send!");
}
else
{
mail("$your_email","$subject","$message","\n verzonden door: $name \n zijn email: $email");
mail("$email","BattlefieldNet","This auto message was send by www.battlefieldnet.com. We will respond on your email as soon as possible.");
echo("Thank you, your message has been send.");
}
}
?>
<?php $your_email = "an_alien@eugamer.com"; if($_POST['submit']) { $subject = $_POST['subject']; $message = $_POST['message']; $name = $_POST['name']; $email = $_POST['email']; { echo("You did not fill in your name! Your mail has not been send!"); } { echo("You did not fill in your email! Your mail has not been send!"); } { echo("You did no fill in a subject! Your mail has not been send!"); } { echo("You did not fill in a message! Your mail has not been send!"); } else { mail("$your_email","$subject","$message","\n verzonden door: $name \n zijn email: $email"); mail("$email","BattlefieldNet","This auto message was send by www.battlefieldnet.com. We will respond on your email as soon as possible."); echo("Thank you, your message has been send."); } } ?>
alleen het vreemde is nu dat, als ik een variable invul zegt ie dat hij leeg is :S kortom omgedraaide wereld. dus stel. je vult je naam in, dan zegt hij dat je dat niet hebt gedaan. vul je alleen het subject in. dan zegt hij dat je het niet gedaan hebt :S vul je niks in, dan verstuurt hij een mailtje (zonder variable inhoud)
waar ligt dit aan?
PS: bedankt voor de reactie op het vorige topic.
|