Jeg har nu sat det hele rigtigt ind, og det ser sådan her ud:
contact.php
<html>
<head>
<title>Ancistrus.dk | Opret din egen personlige akvarie blog.</title>
<meta name="keywords" content="ancistrus, ancistrusdk, ancistrus.dk, blog, webblog, web-blog, akvarie, fisk, galleri, billed, billeder, hosting, aqua, maller,l46, l134, l34, l204, malle, malleforum, malle-forum.dk ">
<meta name="description" content="Gratis akvarie blog, fra MalleForum.dk">
<meta name="author" content="malleforum.dk">
<meta name="robots" content="index, follow">
<link rel="stylesheet" href="_public.style.css">
<style type="text/css">
<!--
.style1 {font-size: 9px}
-->
</style>
</head>
<body bgcolor="#ffffff" topmargin="0" leftmargin="0" rightmargin="0" bottommargin="0" marginheight="0" marginwidth="0">
<script type="text/javascript" src="includes/bannersys.js"></script>
<script type="text/javascript" src="includes/bannersys.js"></script>
<table cellpadding="0" cellspacing="0" width="780" border="0">
<!--
**************************
*** BEGIN PAGE HEADER ****
**************************
-->
<!--
<tr>
<td align="right" height="14" valign="middle">
<table cellpadding="0" cellspacing="0" width="100%">
<tr>
<td><font face="verdana" style="color: #ffffff; font-size: 4;"> Image Hosting, Photo Hosting, Image Uploads, Auction Image Galleries, Image Portfolios & More</td>
<td align="right"><font face="verdana" color="#333333" style="font-size: 10;">Quick Links: <a href="
http://www.ebay.com" class="indexlink">eBay</a> | <a href="
http://www.amazon.com" class="indexlink">Amazon</a> | <a href="
http://www.yahoo.com" class="indexlink">Yahoo</a></td>
</tr>
</table>
</td>
</tr>
-->
<tr>
<td><a href="index.php"><img src="images/Header.gif" border="0" alt="Akvariegalleriet.dk "></a></td>
</tr>
<tr>
<td>
<!--
**************************
***** BEGIN TOP NAV ******
**************************
-->
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td><img src="images/Row2.1.gif"></td>
<td><a href="about.php" onmouseover="AboutUs.src='images/ButtonAboutUsOn.gif';" onmouseout="AboutUs.src='images/ButtonAboutUs.gif';"><img src="images/ButtonAboutUs.gif" name="AboutUs" border="0" alt="About Akvariegalleriet.dk"></td>
<td><a href="faq.php" onmouseover="FAQs.src='images/ButtonFAQsOn.gif';" onmouseout="FAQs.src='images/ButtonFAQs.gif';"><img src="images/ButtonFAQs.gif" name="FAQs" border="0" alt="FAQs"></td>
<td><a href="contact.php" onmouseover="ContactUs.src='images/ButtonContactUsOn.gif';" onmouseout="ContactUs.src='images/ButtonContactUs.gif';"><img src="images/ButtonContactUs.gif" name="ContactUs" border="0" alt="Contact Akvariegalleriet.dk"></td>
<td><a href="signup.php" onmouseover="Signup.src='images/ButtonSignupOn.gif';" onmouseout="Signup.src='images/ButtonSignup.gif';"><img src="images/ButtonSignup.gif" name="Signup" border="0" alt="Akvariegalleriet.dk Signup"></td>
<td><img src="images/Row2.2.gif"></td>
</tr>
</table>
<!--
**************************
******* END TOP NAV ******
**************************
-->
</td>
</tr>
<!--
**************************
**** END PAGE HEADER *****
**************************
--> <tr>
<td>
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td valign="top">
<!--
**************************
**** BEGIN BODY TABLE ****
**************************
-->
<table cellpadding="0" cellspacing="0">
<!--
**************************
** BEGIN INDEX HEADER ***
**************************
-->
<tr>
<td colspan="2"><img src="images/Row3.1.gif"></td>
</tr>
<tr>
<td><img src="images/Row4.1.gif"></td>
<td><img src="images/Row4.2.gif"></td>
</tr>
<tr>
<td class="bgcolor1">
<!--// BEGIN DEMO ACCOUNTS //-->
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td><a href="
http://www.demo.ancistrus.dk/" target="_blank"><img src="images/FreeDemoPC.gif" alt="Vis forsiden, klik her." border="0"></a></td>
<td><a href="
http://www.demo.ancistrus.dk/wp-login.php" target="_blank" onMouseOver="DemoButton.src='images/ButtonDemoOn.gif';" onMouseOut="DemoButton.src='images/ButtonDemo.gif';"><img src="images/ButtonDemo.gif" name="DemoButton" alt="Prøv admin delen, klik her" border="0"></a></td>
</tr>
</table>
<!--// END DEMO ACCOUNTS //--> </td>
<td valign="top" bgcolor="43728e" class="plan" style="padding-top: 5px;padding-left: 5px;">
<? include("includes/nye_oprettelser.html"); ?>
</td>
</tr>
<tr>
<td colspan="2"><img src="images/Row5.1.gif"></td>
</tr>
<!--
**************************
**** END INDEX HEADER ***
**************************
--> <tr>
<td colspan="2" align="center">
<!--
**************************
*** BEGIN BODY CONTENT ***
**************************
-->
<table width="94%">
<tr>
<td>
<table width="100%" height="330" border="0">
<tr>
<td valign="top" class="hptext"><font style="font-size: 12;">
<p><b>Kontakt os</b>
<br>
Udfyld formulaeren nedenfor, for kontakt til os vedr. hjælp til siden, banner, sponsor pladser osv.</p>
<form action="sendmail.php" method="post">
<p>* Navn: <br />
<input name="navn" type="text" />
<br />
* Email:<br />
<input name="email" type="text" />
<br />
* Ønske:<br />
<input name="onske" type="text" />
<br />
* Emne:<br />
<select name="emne">
<br />
<option value="emne1">emne1</option>
<option value="emne2">emne2</option>
<option value="emne3">emne3</option>
</select>
<br />
* Besked:<br />
<textarea name="besked" cols="40" rows="7"></textarea>
</p>
<p> <br />
</p>
<input type="submit" value="submit">
</form> <p> </p></td>
</tr>
<tr><td height="33"> </td>
</tr>
<tr><td height="20"> </td>
</tr>
</table> </td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td> </td>
</tr>
</table>
<!--
**************************
**** END BODY CONTENT ****
**************************
--> </td>
</tr>
</table>
<!--
**************************
***** END BODY TABLE *****
**************************
--> </td>
<td valign="top"bgcolor="#295670"><img src="images/IndexDropShadow.gif"></td>
<td valign="top" bgcolor="#083C58">
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
<!--
**************************
***** BEGIN RIGHT NAV ****
**************************
-->
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td><img src="images/RightNavHeader.jpg"></td>
</tr>
<!--// plan PLAN //-->
<tr>
<td background="images/PlanHeader.gif" height="28" align="left" style="padding-right: 14;"><font face="Arial" style="font-size: 11;" color="#FD9100"> <b>Ancistrus.dk<font face="Arial" style="font-size: 10;" color="#ffffff"> akvarie blog</b></font></td>
</tr>
<tr>
<td background="images/PlanBG.gif" align="center">
<table width="100%">
<tr>
<td height="56" colspan="2" style="padding-left: 20;"><table width="100%">
<tr>
<td height="56" colspan="2" class="plan" style="padding-left: 20;"><strong>· G</strong><b>ratis akvarie blog</b><br>
<b><strong>· </strong>dit-navn.ancistrus.dk</b><br>
<strong>· </strong>Gratis installation<br>
<strong>· </strong>Komplet admin del<br>
<strong>· </strong>Ubegænset webplads</span><br>
<strong>· </strong>Ubegrænset trafik</span><br>
<strong>· </strong>og meget mere...</td>
</tr>
<tr>
<td style="padding-left: 14;"> </td>
<td align="right" style="padding-right: 14;"><a href="signup.php"><img src="images/ButtonSignupIndex.gif" border="0" alt="Opret gratis akvarie blog"></a></td>
</tr>
</table>
<br>
</td>
</tr>
<tr>
<td style="padding-left: 14;"> </td>
<td align="right" style="padding-right: 14;"> </td>
</tr>
</table>
</td>
</tr>
<!--// SILVER PLAN //-->
<tr>
<td><img src="images/RightNavDivider.gif"></td>
</tr>
</table>
<!--
**************************
****** END RIGHT NAV *****
**************************
--> </td>
</tr>
</table> </td>
<td valign="top"><script type="text/javascript">
ShowBanner();
</script>
<script type="text/javascript">
ShowBanner();
</script></td>
</tr>
<tr>
<td background="images/Footer.gif"><img src="images/Footer.gif" border="0"></td>
<td> </td>
</tr>
<tr>
<td>
<!--
**************************
****** BEGIN FOOTER ******
**************************
-->
<table width="100%">
<tr>
<td> </td>
<td width="100%" align="center"><font face="verdana" size="1" color="#767676" style="font-size: 11;"><a href="about.php" class="footer">Omkring os</a> | <a href="faq.php" class="footer">Hjælp</a> | <a href="contact.php" class="footer">Kontakt os</a> | <a href="signup.php" class="footer">Opret konto</a><br>
<font face="verdana" size="1" color="#767676">© 2009 Ancistrus.dk All Rights Reserved
<!--| <a href="#" class="footer"><u>Privacy Statement</u></a>--><!-- | Owned & Operated By Phluid Motion LLC --></td>
<td align="right">
</tr>
</table>
<p>
<!-- chart.dk unified trackercode - v1 -->
<script src="
http://www.chart.dk/js/unified.asp"></script> <script language="javascript">
track_visitor(145558, "");
</script>
<noscript>
<a href="
http://www.chart.dk/ref.asp?id=145558" target="_blank"> <img src="
http://cluster.chart.dk/chart.asp?id=145558" border="0" alt="Chart.dk" /> </a>
</noscript>
<!-- chart.dk unified trackercode - v1 -->
</p>
<!--
**************************
******* END FOOTER *******
**************************
--> </td>
<td> </td>
</tr>
</table>
</body>
</html>
----------------------------------
sendmail.php
<?php
// tjekker om brugeren kommer fra contact.php
if(!isset($_POST['submit']))
{
header("Location:contact.php"); //Hvis brugeren ikke kom fra contact.php, sender vi ham derhen.
}
else
{ // Hvis brugeren kom fra meddelelse.html, så fortsætter vi.
//Henter data fra formular
$navn = $_POST['navn'];
$onske = $_POST['onske'];
$email = $_POST['email'];
$emne = $_POST['mene'];
$besked = $_POST['besked'];
if(empty($navn) || empty($email) || empty($besked) || empty($onske))
{ //Hvis en af variablerne er tomme, kommer brugeren ikke videre.
//Her skal du echo det ud som skal komme hvis de ikke har udfyldt felterne rigtigt.. evt header.location til en anden side?
echo "Du skal udfylde alle felter med * ! Gå tilbage til formen <a href='contact.php' target='_self'>klik her.</a>";
}
else
{ //Hvis der var noget i alle variabler går vi videre til næste tjek.
if(ereg("^.+@.+\\..+$", $email)) { //Hvis brugerens e-mail er gyldig fortsætter vi.
//Nu skal vi til at sende e-mailen.
//Vi laver lige et par variabler mere
$sendto = "info@ancistrus.dk"; //Den adresse som mailen skal sendes til
//Vi laver en variabel, som indeholder alt det, som skal stå i mailen.
$msg = "Besked fra ".$navn."\n";
$msg .= "Afsenderens e-mail: ".$email."\n";
$msg .= "Afsenderens ønske: ".$onske."\n";
$msg .= $navn."'s besked er:\n".$message."\n";
// hvis du vil have at formen automatisk skal sende en mail til brugeren om at du har modtager mailen.
$autosub = "Auto responder fra Ancistrus.dk."; // Dette er emnet i mailen til brugeren
$automsg = "Tak fordi du valgte at skrive til os. \n";
$automsg .= "Vi kontakter dig indenfor 24 timer. \n";
$automsg .= "\n";
$automsg .= "Med Venlig Hilsen \n";
$automsg .= "Ancistrus.dk - André Christensen \n";
$automsg .= "\n";
$automsg .= "Denne mail er en automatisk generet email.";
// ^^ Bare ændre overstående..
//Mailen afsendes
if(mail($sendto, $subject, $msg, $email))
{
mail($email, $autosub, $automsg, "From: info@ancistrus.dk"); // Hvis mailen ovenover blev send med succes, sender vi en mail til brugeren.
echo "<br>";
echo "Din besked du sendte via kontakt formulaeren på Ancistrus.dk, er modtaget hos os.";
echo "<br>";
echo "<br>";
echo "<br>";
}
else // Hvis mailen til dig ikke blev sendt, viser vi en fejl meddelelse.
{
echo "<br>";
echo "<br>";
echo "A error occured. Please try again. <a href='contact.php' title='Click to get back'>Click here to get back to the contact formular.</a>";
echo "<br>";
echo "<br>";
echo "<br>";
}
}
else
{ //Hvis e-mail adressen ikke har et @ kommer vi med endnu en fejl
echo "<br>";
echo "<br>";
echo "Your e-mail is not vaild!";
echo "<br>";
echo "<br>";
echo "<br>";
echo "<br>";
}
}
}
?>
Hvad har jeg gjordt forkert, siden der ikke kommer nogen email.?
Du kan se hvad den gør, ved af teste den selv her:
http://ancistrus.dk/contact.php