sbk2008
Threadersteller
Dabei seit: 17.11.2008
Ort: -
Alter: -
Geschlecht:
|
Verfasst Mo 17.11.2008 00:10
Titel Pflichtfelder im Formmailer |
|
|
hallo ihr.
ich habe ein problem. und zwar habe ein kontakformular erstellt, das funktioniert auch soweit ganz gut, allerdings möchte ich, dass die felder name und e-mail pflichtfelder sind.
nun hab ich schon seit stunden sämtliche foren durchforstet und etliche lösungen versucht. hinbekommen hab ichs aber nicht. ich habe euch jetzt mal das ganze script gepostet, weil ich mich leider nicht sehr gut mit php (auch nicht mit htmlhttp://www.mediengestalter.info/images/smiles/icon_confused.gif) auskenne und somit auch nicht sicher weiß was davon wichtig ist.
also schon mal danke im voraus auf jeden fall und ich hoffe, dass mir irgend wer helfen kann.
Code: | <?php
$strEmpfaenger = 'name@domain.com, name@domain.com';
$strFrom = '"Kontaktmail@domain.com"';
$strSubject = 'Kontaktmail';
$strReturnhtml = 'http://www.domain.com/send.html';
$strDelimiter = ":";
if($_POST)
{
$strMailtext = "";
while(list($strName,$value) = each($_POST))
{
if(is_array($value))
{
foreach($value as $value_array)
{
$strMailtext .= $strName.$strDelimiter.$value_array."\n";
}
}
else
{
$strMailtext .= $strName.$strDelimiter.$value."\n";
}
}
if(get_magic_quotes_gpc())
{
$strMailtext = stripslashes($strMailtext);
}
mail($strEmpfaenger, $strSubject, $strMailtext, "From: ".$strFrom)
or die("Die Mail konnte nicht versendet werden.");
header("Location: $strReturnhtml");
exit;
}
?>
<html>
<head><title>nu-clear Eventsolutions - Life Is A Party</title><STYLE>
A:link {color: #666666; text-decoration: none; }
A:active {color: #666666; text-decoration: none; }
A:visited {color: #666666; text-decoration: none; }
A:hover {color: #999999; text-decoration: none; }
</STYLE><script language="JavaScript" fptype="dynamicanimation"></script>
<script language="JavaScript1.2" fptype="dynamicanimation" src="script/animate.js">
</script><link rel="shortcut icon" type="image/x-icon" href="img/icon.jpg">
</head>
<!-- body -->
<body background="img/bg.gif" onload="dynAnimation()" language="Javascript1.2"><center>
<table border="0" cellpadding="0" cellspacing="0" width="100%" height="5"><tr><td></td></tr></table>
<!-- rahmentabellen -->
<table border="0" cellpadding="0" cellspacing="0" width="804" height="1280" text="#000000" bgcolor="#0B2756" valign="top"><tr><td><center>
<table border="0" cellpadding="0" cellspacing="0" width="800" text="#000000" bgcolor="#D6D6D6" valign="top"><tr><td><center>
<!-- banner top -->
<table border="0" cellpadding="0" cellspacing="0" width="800" height="169" background="img/banner_top.jpg"><tr><td></td></tr></table>
<!-- navigation -->
<table border="0" cellpadding="0" cellspacing="0" width="800" background="img/strich.jpg" height="95">
<tr height="75" valign="top">
<td width="225"></td>
<td width="105"><a href="kontakt.php" onmouseover="document['fpAnimswapImgFP15'].imgRolln=document['fpAnimswapImgFP15'].src;document['fpAnimswapImgFP15'].src=document['fpAnimswapImgFP15'].lowsrc;" onmouseout="document['fpAnimswapImgFP15'].src=document['fpAnimswapImgFP15'].imgRolln">
<img border="0" src="img/kontakt.jpg" start="fileopen" align="left" id="fpAnimswapImgFP15" name="fpAnimswapImgFP15" dynamicanimation="fpAnimswapImgFP15" lowsrc="img/kontakt2.jpg" width="105" height="75"></a></td>
<td width="35"></td>
<td width="105"><a onmouseover="document['fpAnimswapImgFP14'].imgRolln=document['fpAnimswapImgFP14'].src;document['fpAnimswapImgFP14'].src=document['fpAnimswapImgFP14'].lowsrc;" onmouseout="document['fpAnimswapImgFP14'].src=document['fpAnimswapImgFP14'].imgRolln" href="team.html">
<img border="0" src="img/team.jpg" id="fpAnimswapImgFP14" name="fpAnimswapImgFP14" dynamicanimation="fpAnimswapImgFP14" lowsrc="img/team2.jpg" width="105" height="75"></a></td>
<td width="35"></td>
<td width="105"><a onmouseover="document['fpAnimswapImgFP12'].imgRolln=document['fpAnimswapImgFP12'].src;document['fpAnimswapImgFP12'].src=document['fpAnimswapImgFP12'].lowsrc;" onmouseout="document['fpAnimswapImgFP12'].src=document['fpAnimswapImgFP12'].imgRolln" href="about.html">
<img border="0" src="img/about.jpg" id="fpAnimswapImgFP12" name="fpAnimswapImgFP12" dynamicanimation="fpAnimswapImgFP12" lowsrc="img/about2.jpg" width="105" height="75"></a></td>
<td width="35"></td>
<td width="105"><a onmouseover="document['fpAnimswapImgFP13'].imgRolln=document['fpAnimswapImgFP13'].src;document['fpAnimswapImgFP13'].src=document['fpAnimswapImgFP13'].lowsrc;" onmouseout="document['fpAnimswapImgFP13'].src=document['fpAnimswapImgFP13'].imgRolln" href="jobs.html">
<img border="0" src="img/jobs.jpg" id="fpAnimswapImgFP13" name="fpAnimswapImgFP13" dynamicanimation="fpAnimswapImgFP13" lowsrc="img/jobs2.jpg" width="105" height="75"></a></td>
<td width="50"></td>
</tr><tr height="20"></tr></table>
<!-- bubble -->
<table border="0" cellpadding="0" cellspacing="0" width="800" height="25" background="img/bubble_oben.jpg"><tr><td></td></tr></table>
<table border="0" cellpadding="0" cellspacing="0" width="800" height="400" text="#000000" background="img/bubble.jpg" valign="top"><tr><td valign="top"><center>
<!-- content -->
<table width="750" height="60" text="#000000">
<tr height="10"><td width="500" valign="top" align="right" text="#000000"><font face="Arial Narrow, Arial, Helvetica, sans-serif" size="4"><b><a href="index.html">nu-clear Eventsolutions Home</a> >> Kontakt </b></font></td><td width="250"></td></tr>
<tr height="50"><td width="500" valign="top" align="center"><hr noshade width="500" size="2"></td><td width="250"></td></tr>
</table>
<table width="750" height="340" text="#000000">
<tr height="340"><td width="100"></td>
<td width="275" valign="top" align="left"><font face="Verdana, Arial Helvetica, sans-serif" size="2"><div align="justify">
<b>Sie erreichen uns unter:</b><br><br><br>nu-clear Eventsolutions<br><br>F Str. 20<br>8.... München<br><br>Telefon: +49 89 ......
</div></front></td>
<td width="25"></td>
<td width="300" valign="top" align="left"><font face="Verdana, Arial Helvetica, sans-serif" size="2"><div align="justify">
<b>Oder Sie senden uns hiermit eine e-Mail:</b><br><br>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de">
<head>
<title>Einfacher PHP-Formmailer</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
</head>
<body>
<form action="<?php print $_SERVER['PHP_SELF']; ?>" method="post">
<!-- Eingabefelder -->
Vorname, Name:<br><input type="text" name="Versender" size="40" maxlength="50" /><br>
e-Mail:<br><input type="text" name="e-Mail" size="40" maxlength="50" /><br>
Betreff:<br><input type="text" name="Betreff" size="40" maxlength="50" /><br>
Ihre Nachricht an uns:<br><textarea name="Nachricht" rows="5" cols="30"></textarea><br>
<p>
<input type="submit" value="Senden" />
<input type="reset" value="Zurücksetzen" />
</p>
</form>
</body>
</html>
</div></front></td>
<td width="50"></td></tr>
</table>
</body>
</html>
<table width="750" height="40" text="#000000">
<tr height="10"><td width="500" valign="top" align="right" text="#000000"><font face="Verdana, Arial, Helvetica, sans-serif" size="3"><b><a href="index.html">nu-clear</a> >> Impressum </b></font></td><td width="250"></td></tr>
<tr height="30"><td width="500" valign="top" align="center"><hr noshade width="500" size="2"></td><td width="250"></td></tr>
</table>
<table width="750" height="548" text="#000000">
<tr height="500"><td width="150"></td>
<td width="550" valign="top" align="left"><font face="Verdana, Arial Helvetica, sans-serif" size="2"><div align="justify">
<b>nu-clear Eventsolutions</b><br><br>... & ... GbR<br>F Str. 20<br>8.... München<br>Telefon: +49 89 ......<br><br><br><b>Inhaber:</b> ... GbR<br><br><b>Webdesign:</b> Sebastian ... & Tobias ...<br><br><br><b>Rechtshinweise:</b><br>Sollten Sie der Copyright-Inhaber auf dieser Seite verwendeten Binärmaterials (Bilder oder Namen) nicht damit einverstanden sein, dass es hier verwendet wird, bitte kontaktieren Sie uns. Wir werden es dann von dieser Seite entfernen.<br><br><br><b>Wichtiger Hinweis:</b><br>Das Landgericht Hamburg hat mit Urteil vom 12.05.1998 entschieden, dass man durch die Ausbringung eines Links die Inhalte der gelinkten Seite ggf. mit zu verantworten hat.<br>Dies kann - so das LG - nur dadurch verhindert werden, dass man sich ausdrücklich von diesen Inhalten distanziert.<br>Wir haben auf unserer Page "nu-clear-online" Links zu anderen Seiten im Internet gelegt.<br>Für all diese Links gilt:
<ul><li>Wir möchten ausdrücklich betonen, dass wir keinerlei Einfluß auf die Gestaltung und die Inhalte der gelinkten Seite haben.</li>
<li>Deshalb distanzieren wir uns hiermit ausdrücklich von allen Inhalten aller gelinkten Seiten auf unserer gesamten Website inkl. aller Unterseiten.</li>
<li>Diese Erklärung gilt für alle auf unserer Homepage ausgebrachten Links und für alle Inhalte der Seiten, zu denen Links oder Banner führen.</li></ul>Alle Angaben innerhalb dieser Website wurden nach bestem Wissen und Gewissen gemacht, und für eventuelle Fehler wird keine Haftung übernommen.
</font></div></td>
<td width="50"></td></tr>
<tr height="48"><td></td></tr>
</table>
</center></td></tr></table>
<!-- bubble unten -->
<table border="0" cellpadding="0" cellspacing="0" width="800" height="25" background="img/bubble_unten.jpg"><tr><td></td></tr></table>
<table border="0" cellpadding="0" width="800" height="15" bgcolor="#D6D6D6"><tr><td></td></tr></table>
<!-- banner end -->
<table border="0" cellpadding="0" cellspacing="0" width="800" height="160" background="img/banner_end.gif"><tr><td></td></tr></table>
<table border="0" cellpadding="0" cellspacing="0" width="800" height="1"><tr><td></td></tr></table>
<table border="0" cellpadding="0" cellspacing="0" width="800" height="2" bgcolor="#0B2756"><tr><td></td></tr></table>
</center></td></tr></table>
</center></td></tr></table>
<table border="0" cellpadding="0" cellspacing="0" width="790" height="25"><tr><td valign="bottom" align="right"><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><a href="F90e9A6c201BAa00e4416F16bFc296f3.html">© nu-clear Eventsolutions</a></font></td></tr></table>
</center></body></html> |
|
|