PHP mailform
Hey...Er ved at lave en hjemmeside og skal have en kontakt side.
Jeg har 3 filer; default.htm, kontakt.htm og send.php.
Problemet er at jeg ikke kan få den til at sende det jeg skriver i formen og at der bare kommer en "The page can not be found" side frem.
Er der mon en som kan hjælpe?? :S
På forhånd 1000 1000 tak!!! :)
******************************
default.htm:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body class="mainbody">
<br />
<table class="maintable" align="center" border="0" cellpadding="0" cellspacing="0" id="maintargetwindow">
<tr bgcolor="#021ABD">
<td width="243" height="95" bgcolor="#021ABD" class="top_td"> <p align="left"><img src="billeder/2v3.jpg" width="105" height="95"><strong>ELLER
BANNER?</strong> </p></td>
<td width="206" height="95" align="right" valign="middle" class="top_td"><p>navn</p>
<p>adresse</p>
<p>postnr by</p>
</tr>
<tr>
<td colspan="2" class="top_td"></td>
</tr>
<tr>
<td colspan="2" class="top_td"></td>
</tr>
<tr>
<td colspan="2" class="top_td"></td>
</tr>
<tr>
<td colspan="2" class="top_td"></td>
</tr>
<tr bgcolor="#AAAAAA">
<td colspan="2" align="center" class="menu_td">
.: | <a href="sider/forside.htm" target="maintargetwindow">Forsiden</a>
|| <a href="sider/biografi.htm" target="maintargetwindow">Biografi</a>
|| <a href="sider/cv.htm" target="maintargetwindow">CV</a>
|| <a href="sider/klumme.htm" target="maintargetwindow">Lars' klumme</a>
|| <a href="sider/galleri.htm" target="maintargetwindow">Galleri</a>
|| <a href="sider/kontakt.htm" target="maintargetwindow">Kontakt</a>
|| <a href="sider/links.htm" target="maintargetwindow">Links</a> | :.
</td>
</tr>
<tr>
<td colspan="2" align="center" class="main_td"> <table class="iborder">
<tr>
<td> <iframe name="maintargetwindow" src="sider/forside.htm" align="middle" marginheight="10" marginwidth="10" height="300" scrolling="no" width="660" frameborder="0"></iframe>
</td>
</tr>
</table></tr>
<tr bgcolor="#0033CC">
<td colspan="2" align="center" valign="middle" class="bottom_td">
<!-- --------------------------------Adresse start------------------------------>
copyright © <a href="mailto:christina3018@ofir.dk"><font color="#000000">LWH</font></a> - 2006
<!-- --------------------------------Adresse slut------------------------------->
</td>
</tr>
</table>
<table width="760" align="center">
</table>
<table align="center">
</table>
</body>
</html>
***********
kontakt.htm:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<form method="post" action="sider/send.php">
<fieldset>
<table width="200" border="0">
<tr>
<td>Navn:</td>
<td><input id="t1" type="text" name="name" /></td>
</tr>
<tr>
<td><label for="label">Adresse:</label></td>
<td><input id="t2" type="text" name="adr" /></td>
</tr>
<tr>
<td>Postnr:</td>
<td><input name="postnr" type="text" id="t3" size="4" maxlength="4" />
By:
<input id="t4" type="text" name="by" /></td>
</tr>
<tr>
<td><label for="label">Telefon:</label></td>
<td><input name="tlf" type="text" id="t5" size="8" maxlength="8" /></td>
</tr>
<tr>
<td><label for="label">E-mail:</label></td>
<td><input name="email" type="text" id="t6" value=""></td>
</tr>
<tr>
<td valign="top">Besked:</td>
<td><textarea id="t7" name="message" rows="5" cols="30"></textarea></td>
</tr>
<tr>
<td> </td>
<td><input type="submit" name="sendMail" value=" Send mail " />
<input name="reset" type="reset" value=" Slet alt " /></td>
</tr>
</table>
<label for="t1"></label>
<label for="t2"></label>
<label for="t3"></label>
<label for="t4"></label>
<label for="t5"></label>
<label for="t6"></label>
<label for="t7"></label>
</fieldset>
</form>
</body>
</html>
*****************
send.php:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<div id="maintargetwindow" style="position:absolute; left:183px; top:139px; width:286px; height:351px; z-index:1; overflow: visible;">
<?php
if (isset($_POST['sendMail']))
{
if (!empty($_POST['name']) && !empty($_POST['adr']) && !empty($_POST['postnr']) && !empty($_POST['by']) && !empty($_POST['tlf']) && !empty($_POST['email']) && !empty($_POST['message']))
{
$headers = "C-svenstrup - " . $_POST['name'] . " <" . $_POST['email'] . ">\n";
$message = "Navn :" . $_POST["name"] . "\nAdresse: " . $_POST["adr"] . "\nPostnr og by: " . $_POST["postnr"] . " " . $_POST["by"] . "\nTelefon: " . $_POST["tlf"] . "\nE-mail: " . $_POST["email"]. "\n\n" . $_POST["message"];
if (mail("christina3018@ofir.dk",$headers, $message))
{
echo "<p>Tak for din henvendelse.</p>";
echo "";
echo "<a href=sider/kontakt.htm>Tilbage</a>";
}
else
{
echo "<p>E-mailen blev ikke sendt. Der skete en fejl. Prøv igen!</p>";
echo "";
echo "<a href=sider/kontakt.htm>Tilbage</a>";
}
}
else
{
echo "<p>Alle felter skal udfyldes!</p>";
echo "";
echo "<a href=sider/kontakt.htm>Tilbage</a>";
}
}
?>
</div>
</body>
</html>