PSD-Tutorials.de
Forum für Design, Fotografie & Bildbearbeitung
Tutkit
Agentur
Hilfe
Kontakt
Start
Forum
Aktuelles
Besonderer Inhalt
Foren durchsuchen
Tutorials
News
Anmelden
Kostenlos registrieren
Aktuelles
Suche
Suche
Nur Titel durchsuchen
Von:
Menü
Anmelden
Kostenlos registrieren
App installieren
Installieren
JavaScript ist deaktiviert. Für eine bessere Darstellung aktiviere bitte JavaScript in deinem Browser, bevor du fortfährst.
Du verwendest einen veralteten Browser. Es ist möglich, dass diese oder andere Websites nicht korrekt angezeigt werden.
Du solltest ein Upgrade durchführen oder einen
alternativen Browser
verwenden.
Antworten auf deine Fragen:
Neues Thema erstellen
Start
Forum
Sonstiges
Webdesign, Webentwicklung & Programmierung
PHP, Javascript, jQuery, Ajax, nodeJS, MySQL...
Kontaktformular ohne Fehler aber auch ohne Email
Beitrag
<blockquote data-quote="lucky51179" data-source="post: 1180895" data-attributes="member: 345930"><p>Hallo habe das Kontaktformular so hinbekommen das ich keinen Fehler mehr habe aber leider versendet er dieses nicht an die Emailadresse.</p><p> </p><p>Kann es sein da es nur auf meinen PC läuft und nicht im Internet steht ?</p><p> </p><p>Hilfe</p><p> </p><p>[html]<?php session_start();</p><p> </p><p>// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~</p><p>// Kontaktformular.org</p><p>// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~</p><p> </p><p>// Einstellungen</p><p> </p><p>// Ihre E-Mailadresse</p><p>$ihre_emailadresse = 'info@lebe-kickboxarena.de';</p><p> </p><p>// Absender || Muster(From: NAME <EMAIL>) // Beispiel: 'From: Max Mustermann <max@musterdomain.tld>'</p><p>$email_absender = 'From: Kontaktformular <system@domain.tld>';</p><p> </p><p>// Betreff</p><p>$email_betreffzeile = 'Kontaktformular-Anfrage-Lebe-Kickboxarena';</p><p> </p><p> </p><p> </p><p>// Hinweismeldungen</p><p> </p><p>#Nicht alle Felder ausgefllt</p><p>$errormessage[0] = 'Fehler, Sie haben nicht alle Felder ausgef&uuml;llt:';</p><p>#Kein Name eingegeben</p><p>$errormessage[1] = '<br />- Ung&uuml;ltiger Name';</p><p>#Ungltige E-Mailadresse eingegeben</p><p>$errormessage[2] = '<br />- Ung&uuml;ltiger E-Mailadresse';</p><p>#Kein Betreff eingegeben</p><p>$errormessage[3] = '<br />- Ung&uuml;ltiger Betreff';</p><p>#Keine Nachricht eingegeben</p><p>$errormessage[4] = '<br />- Ung&uuml;ltige Nachricht';</p><p>#Ungltiger Sicherheitscode</p><p>$errormessage[5] = '<br />- Ung&uuml;ltiger Sicherheitscode';</p><p>#Ungltiger Zeichen (Spamverdacht)</p><p>$errormessage[6] = '<br />- Ung&uuml;ltige Zeichen entdeckt';</p><p> </p><p>#Alle Felder sind OK</p><p>$okay = 'Vielen Dank f&uuml;r Ihre Nachricht, wir werden Sie demn&auml;chst bearbeiten!<br /><br />';</p><p> </p><p> </p><p> </p><p> </p><p> </p><p>// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~</p><p>// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~</p><p> </p><p> </p><p> #######################################</p><p> </p><p> #######################################</p><p> </p><p> </p><p> if(isset($_POST['submit'])) {</p><p> #######################################</p><p> </p><p> $name = check($_POST['name']);</p><p> $email = check($_POST['email']);</p><p> $betreff = check($_POST['betreff']);</p><p> $nachricht = check($_POST['nachricht']);</p><p> </p><p> #######################################</p><p> </p><p> $ip = $_SERVER['REMOTE_ADDR'];</p><p> $host = gethostbyaddr($ip);</p><p> </p><p> #######################################</p><p> </p><p> $zeit = time();</p><p> $datum = date ("d.m.Y", $zeit);</p><p> $uhrzeit = date ("H:i:s", $zeit);</p><p> </p><p> #######################################</p><p> </p><p> $message = '<span style="color:red">' . $errormessage[0];</p><p> </p><p> if($name==''){$message .= $errormessage[1]; $fehler = 1;}</p><p> </p><p> if(!ereg("^[_a-zA-Z0-9-]+(\.[_a-zA-Z0-9-]+)*@([a-zA-Z0-9-]+\.)+([a-zA-Z]{2,6})$", $email)) {</p><p> $message .= $errormessage[2]; $fehler = 1;}</p><p> </p><p> if($betreff==''){$message .= $errormessage[3]; $fehler = 1;}</p><p> </p><p> if($nachricht==''){$message .= $errormessage[4]; $fehler = 1;}</p><p> </p><p> if($_POST['code']=="" || strtolower($_POST['code'])!=$_SESSION['captcha_code']){</p><p> $message .= $errormessage[5]; $fehler = 1;}</p><p> </p><p> if(ehi_check()!=0){$message .= $errormessage[6]; $fehler = 1;}</p><p> </p><p> $message .= '</span><br /><br />';</p><p> </p><p> #######################################</p><p> </p><p> #######################################</p><p> </p><p> if(!isset($fehler)){</p><p> </p><p> $email_nachricht = "-- Kontakformularanfrage Lebe Kickboxarena --\n\nBetreff: $betreff";</p><p> $email_nachricht .= "\nName: $name\nE-Mailadresse: $email\nHomepage: $firma\n\n";</p><p> $email_nachricht .= "Nachricht:\n$nachricht\n\nIP: $ip\nHost: $host\n";</p><p> $email_nachricht .= "gesendet am $datum um $uhrzeit.";</p><p> </p><p> // Mail senden</p><p> @mail($ihre_emailadresse, $email_betreffzeile, $email_nachricht, $email_absender);</p><p> </p><p> //Variablen resetten</p><p> $name = '';</p><p> $betreff = '';</p><p> $email = '';</p><p> $nachricht = '';</p><p> </p><p> </p><p> $meldung=$okay;</p><p> </p><p> } else {</p><p> $meldung=$message;</p><p> }</p><p> #######################################</p><p> #######################################</p><p> } //endissetsubmit</p><p> else{$meldung='';}</p><p> </p><p> </p><p>// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~</p><p>// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~</p><p>?></p><p> </p><p><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"></p><p><html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="Templates/normal.dwt.php" codeOutsideHTMLIsLocked="false" --></p><p><head></p><p><link rel="shortcut icon" href="icon.ico" ><meta name="keywords" content="Kickboxen, Lebe-Kickboxarena, Lebe, Training, Fitness, Windsbach, Jürgen leidel,lebe kickboxarena, Kindertraining/></p><p><meta name="description" content="Wir Trainieren Jung wie Alt ob Geist oder Körper" /></p><p><meta name="Lebe Kickboxarena" content="Spezialis" /></p><p><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /></p><p><!-- InstanceBeginEditable name="doctitle" --></p><p><title>Lebe-Kickboxarena &amp; Co</title></p><p><!-- InstanceEndEditable --></p><p><link href="styles/thrColHybHdr.css" rel="stylesheet" type="text/css" /><!--[if IE]></p><p><style type="text/css"> </p><p>/* Fügen Sie CSS-Korrekturen für alle IE-Versionen in diesen bedingten Kommentar ein. */</p><p>.twoColHybLtHdr #sidebar1 { padding-top: 30px; }</p><p>.twoColHybLtHdr #mainContent { zoom: 1; padding-top: 15px; }</p><p>/* Mit der obigen proprietären Zoom-Eigenschaft wird IE die Eigenschaft hasLayout zugewiesen, die gegebenenfalls zur Verhinderung verschiedener Fehler erforderlich ist. */</p><p></style></p><p><![endif]--></p><p><!-- InstanceBeginEditable name="head" --></p><p><!-- InstanceEndEditable --></p><p><style type="text/css"></p><p><!--</p><p>body {</p><p> background-color: #470006;</p><p>}</p><p>--></p><p></style></p><p><link href="styles/styles.css" rel="stylesheet" type="text/css" /></p><p><script type="text/javascript"></p><p><!--</p><p>function MM_preloadImages() { //v3.0</p><p> var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();</p><p> var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)</p><p> if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}</p><p>}</p><p> </p><p>function MM_findObj(n, d) { //v4.01</p><p> var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {</p><p> d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}</p><p> if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];</p><p> for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);</p><p> if(!x && d.getElementById) x=d.getElementById(n); return x;</p><p>}</p><p> </p><p>function MM_nbGroup(event, grpName) { //v6.0</p><p> var i,img,nbArr,args=MM_nbGroup.arguments;</p><p> if (event == "init" && args.length > 2) {</p><p> if ((img = MM_findObj(args[2])) != null && !img.MM_init) {</p><p> img.MM_init = true; img.MM_up = args[3]; img.MM_dn = img.src;</p><p> if ((nbArr = document[grpName]) == null) nbArr = document[grpName] = new Array();</p><p> nbArr[nbArr.length] = img;</p><p> for (i=4; i < args.length-1; i+=2) if ((img = MM_findObj(args[i])) != null) {</p><p> if (!img.MM_up) img.MM_up = img.src;</p><p> img.src = img.MM_dn = args[i+1];</p><p> nbArr[nbArr.length] = img;</p><p> } }</p><p> } else if (event == "over") {</p><p> document.MM_nbOver = nbArr = new Array();</p><p> for (i=1; i < args.length-1; i+=3) if ((img = MM_findObj(args[i])) != null) {</p><p> if (!img.MM_up) img.MM_up = img.src;</p><p> img.src = (img.MM_dn && args[i+2]) ? args[i+2] : ((args[i+1])? args[i+1] : img.MM_up);</p><p> nbArr[nbArr.length] = img;</p><p> }</p><p> } else if (event == "out" ) {</p><p> for (i=0; i < document.MM_nbOver.length; i++) {</p><p> img = document.MM_nbOver[i]; img.src = (img.MM_dn) ? img.MM_dn : img.MM_up; }</p><p> } else if (event == "down") {</p><p> nbArr = document[grpName];</p><p> if (nbArr)</p><p> for (i=0; i < nbArr.length; i++) { img=nbArr[i]; img.src = img.MM_up; img.MM_dn = 0; }</p><p> document[grpName] = nbArr = new Array();</p><p> for (i=2; i < args.length-1; i+=2) if ((img = MM_findObj(args[i])) != null) {</p><p> if (!img.MM_up) img.MM_up = img.src;</p><p> img.src = img.MM_dn = (args[i+1])? args[i+1] : img.MM_up;</p><p> nbArr[nbArr.length] = img;</p><p> } }</p><p>}</p><p>//--></p><p></script></p><p></head></p><p> </p><p><body class="twoColHybLtHdr" onload="MM_preloadImages('image/bottum_home_a.jpg','image/bottum_home_h.jpg','image/bottum_location_a.jpg','image/bottum_location_h.jpg','image/bottum_training_a.jpg','image/bottum_training_h.jpg','image/bottum_trainerteam_a.jpg','image/bottum_trainerteam_h.jpg','image/bottum_preise_a.jpg','image/bottum_preise_h.jpg','image/bottum_kontakt_a.jpg','image/bottum_kontakt_h.jpg','image/bottum_leer_oben.jpg','image/bottum_leer_unten.jpg')"></p><p> </p><p><div id="container"></p><p> <div id="header"><img src="image/logo.jpg" alt="Logo des LebeKickboxarena" width="479" height="172" /></p><p> <!-- end #header --></div></p><p> <div id="sidebar1"></p><p> <table border="0" cellpadding="0" cellspacing="0"></p><p> <tr></p><p> <td><a href="javascript:;" target="_top" onClick="MM_nbGroup('down','group1','bottumleeroben','image/bottum_leer_oben.jpg',1)" onMouseOver="MM_nbGroup('over','bottumleeroben','image/bottum_leer_oben.jpg','image/bottum_leer_oben.jpg',1)" onMouseOut="MM_nbGroup('out')"><img name="bottumleeroben" src="image/bottum_leer_oben.jpg" border="0" alt="" onLoad="" /></a></td></p><p> </tr></p><p> <tr></p><p> <td><a href="index.php" target="_top" onclick="MM_nbGroup('down','group1','bottumhome','image/bottum_home_a.jpg',1)" onmouseover="MM_nbGroup('over','bottumhome','image/bottum_home_h.jpg','image/bottum_home_a.jpg',1)" onmouseout="MM_nbGroup('out')"><img src="image/bottum_home.jpg" alt="Home" name="bottumhome" width="150" height="25" border="0" id="bottumhome" onload="" /></a></td></p><p> </tr></p><p> <tr></p><p> <td><a href="location.php" target="_top" onClick="MM_nbGroup('down','group1','location','image/bottum_location_a.jpg',1)" onMouseOver="MM_nbGroup('over','location','image/bottum_location_h.jpg','image/bottum_location_a.jpg',1)" onMouseOut="MM_nbGroup('out')"><img name="location" src="image/bottum_location.jpg" border="0" alt="Location" onLoad="" /></a></td></p><p> </tr></p><p> <tr></p><p> <td><a href="training.php" target="_top" onClick="MM_nbGroup('down','group1','bottumtraining','image/bottum_training_a.jpg',1)" onMouseOver="MM_nbGroup('over','bottumtraining','image/bottum_training_h.jpg','image/bottum_training_a.jpg',1)" onMouseOut="MM_nbGroup('out')"><img name="bottumtraining" src="image/bottum_training.jpg" border="0" alt="Training" onLoad="" /></a></td></p><p> </tr></p><p> <tr></p><p> <td><a href="trainerteam.php" target="_top" onClick="MM_nbGroup('down','group1','bottumtrainerteam','image/bottum_trainerteam_a.jpg',1)" onMouseOver="MM_nbGroup('over','bottumtrainerteam','image/bottum_trainerteam_h.jpg','image/bottum_trainerteam_a.jpg',1)" onMouseOut="MM_nbGroup('out')"><img name="bottumtrainerteam" src="image/bottum_trainerteam.jpg" border="0" alt="Trainerteam" onLoad="" /></a></td></p><p> </tr></p><p> <tr></p><p> <td><a href="preise.php" target="_top" onClick="MM_nbGroup('down','group1','bottumpreise','image/bottum_preise_a.jpg',1)" onMouseOver="MM_nbGroup('over','bottumpreise','image/bottum_preise_h.jpg','image/bottum_preise_a.jpg',1)" onMouseOut="MM_nbGroup('out')"><img name="bottumpreise" src="image/bottum_preise.jpg" border="0" alt="Preise" onLoad="" /></a></td></p><p> </tr></p><p> <tr></p><p> <td><a href="kontakt.php" target="_top" onClick="MM_nbGroup('down','group1','bottumkontakt','image/bottum_kontakt_a.jpg',1)" onMouseOver="MM_nbGroup('over','bottumkontakt','image/bottum_kontakt_h.jpg','image/bottum_kontakt_a.jpg',1)" onMouseOut="MM_nbGroup('out')"><img name="bottumkontakt" src="image/bottum_kontakt.jpg" border="0" alt="Kontakt" onLoad="" /></a></td></p><p> </tr></p><p> <tr></p><p> <td><a href="javascript:;" target="_top" onClick="MM_nbGroup('down','group1','bottumleerunten','image/bottum_leer_unten.jpg',1)" onMouseOver="MM_nbGroup('over','bottumleerunten','image/bottum_leer_unten.jpg','image/bottum_leer_unten.jpg',1)" onMouseOut="MM_nbGroup('out')"><img name="bottumleerunten" src="image/bottum_leer_unten.jpg" border="0" alt="" onLoad="" /></a></td></p><p> </tr></p><p> </table></p><p> <p>&nbsp;</p></p><p> <!-- end #sidebar1 --></div></p><p> <div id="mainContent"><!-- InstanceBeginEditable name="inhalt" --></p><p> <form name="kontaktformular" action="<?php echo $_SERVER['kontaktformular/PHP_SELF']; ?>" method="post"></p><p> <table width="600%" border="0" align="left" style="width:400px; text-align: left; font-weight: bold;"></p><p> <tr></p><p> <td colspan="4"><?php echo $meldung; ?></td></p><p> </tr></p><p> <tr></p><p> <td style="width:150px"><span class="kontakt"><strong>Name:</strong></span></td></p><p> <td><span class="kontakt"></p><p> <input name="name" type="text" value="<?php echo $name; ?>" size="35" maxlength="100" style="filter:Chroma(color=#ffffff)"/></p><p> </span></td></p><p> <td></td></p><p> <td class="kontakt">Nachricht:</td></p><p> </tr></p><p> <tr></p><p> <td style="width:150px"><span class="kontakt"><strong>E-Mail Adresse:</strong><br /></p><p> </span></td></p><p> <td><span class="kontakt"></p><p> <input name="email" type="text" id="email" value="<?php echo $email; ?>" size="35" maxlength="100" style="filter:Chroma(color=#ffffff)"/></p><p> </span></td></p><p> <td></td></p><p> <td rowspan="6"><span class="kontakt"></p><p> <textarea name="nachricht" cols="40" rows="12" style="filter:Chroma(color=#ffffff)"><?php echo $nachricht; ?></textarea></p><p> </span></td></p><p> </tr></p><p> <tr></p><p> <td style="width:150px"><span class="kontakt"><strong>Betreff:</strong></span></td></p><p> <td><span class="kontakt"></p><p> <input name="betreff" type="text" value="<?php echo $betreff; ?>" size="35" maxlength="50" style="filter:Chroma(color=#ffffff)"/></p><p> </span></td></p><p> <td></td></p><p> </tr></p><p> <tr></p><p> <td style="width:150px">&nbsp;</td></p><p> <td>&nbsp;</td></p><p> <td></td></p><p> </tr></p><p> <tr></p><p> <td style="width:150px"><span class="kontakt"><strong>Sicherheitscode:</strong></span></td></p><p> <td><div id="reloadit" style="width:124px;height:40px;text-align:center;border:0px solid black;"> <span class="kontakt"><img id="captcha" src="captcha.php?<?php echo SID; ?>" alt="captcha" /></span></div></p><p> <span class="kontakt"><a style="color:black;text-decoration:none;" href="javascript:reload_captcha();">Neuer Code</a></span></td></p><p> <td></td></p><p> </tr></p><p> <tr></p><p> <td style="width:150px"><span class="kontakt"><strong>Sicherheitscode <br /></p><p> wiederholen: </strong></span></td></p><p> <td><span class="kontakt"></p><p> <input name="code" type="text" size="20" maxlength="50" style="filter:Chroma(color=#ffffff)" /></p><p> </span></td></p><p> <td style="width:130px">&nbsp;</td></p><p> </tr></p><p> <tr></p><p> <td style="width:150px">&nbsp;</td></p><p> <td>&nbsp;</td></p><p> <td></td></p><p> </tr></p><p> <tr></p><p> <td style="width:150px">&nbsp;</td></p><p> <td>&nbsp;</td></p><p> <td></td></p><p> <td><span class="kontakt"></p><p> <input type="hidden" name="PHPSESSID" value="<?php echo htmlspecialchars(session_id());?>" /></p><p> <input type="submit" value="Versenden" name="submit" /></p><p> </span></td></p><p> </tr></p><p> <tr></p><p> <td style=>&nbsp;</td></p><p> <td>&nbsp;</td></p><p> <td></td></p><p> <td>&nbsp;</td></p><p> </tr></p><p> </table></p><p> </form></p><p> <p>&nbsp;</p></p><p> <!-- InstanceEndEditable --></p><p> <!-- end #mainContent --></div></p><p> <!-- Dieses clear-Element sollte direkt auf das #mainContent-div folgen, um das #container-div anzuweisen, alle untergeordneten Floats aufzunehmen. --></p><p> <br class="clearfloat" /></p><p> <div id="footer"></p><p> <p>Lebe-Kickboxarena &amp; Co&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="kontakt.php">Kontakt</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="impressum.php">Impressum</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="weblogin.php">WebLogin</a></p></p><p> <!-- end #footer --></div></p><p><!-- end #container --></div></p><p></body></p><p><!-- InstanceEnd --></html></p><p><?php </p><p>// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~</p><p>// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ </p><p> </p><p> </p><p>function check($var){</p><p>$varsafe=trim(strip_tags($var));</p><p>return $varsafe;</p><p>}</p><p> </p><p> </p><p>function ehi_check(){</p><p>$achtung=0;</p><p>foreach($_POST as $val){</p><p>$pos = strpos(strtolower($val), 'content-type:'); if($pos !== false){$achtung++;}</p><p>$pos = strpos(strtolower($val), 'content-type'); if($pos !== false){$achtung++;}</p><p>$pos = strpos(strtolower($val), 'bcc:'); if($pos !== false){$achtung++;}</p><p>$pos = strpos(strtolower($val), 'bcc'); if($pos !== false){$achtung++;}</p><p>} //endforeach</p><p>return $achtung; // wenn Null dann Alles Okay</p><p>} </p><p> </p><p> </p><p>// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ </p><p>// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ </p><p>?></p><p></html>[/html]</p></blockquote><p></p>
[QUOTE="lucky51179, post: 1180895, member: 345930"] Hallo habe das Kontaktformular so hinbekommen das ich keinen Fehler mehr habe aber leider versendet er dieses nicht an die Emailadresse. Kann es sein da es nur auf meinen PC läuft und nicht im Internet steht ? Hilfe [html]<?php session_start(); // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // Kontaktformular.org // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // Einstellungen // Ihre E-Mailadresse $ihre_emailadresse = 'info@lebe-kickboxarena.de'; // Absender || Muster(From: NAME <EMAIL>) // Beispiel: 'From: Max Mustermann <max@musterdomain.tld>' $email_absender = 'From: Kontaktformular <system@domain.tld>'; // Betreff $email_betreffzeile = 'Kontaktformular-Anfrage-Lebe-Kickboxarena'; // Hinweismeldungen #Nicht alle Felder ausgefllt $errormessage[0] = 'Fehler, Sie haben nicht alle Felder ausgefüllt:'; #Kein Name eingegeben $errormessage[1] = '<br />- Ungültiger Name'; #Ungltige E-Mailadresse eingegeben $errormessage[2] = '<br />- Ungültiger E-Mailadresse'; #Kein Betreff eingegeben $errormessage[3] = '<br />- Ungültiger Betreff'; #Keine Nachricht eingegeben $errormessage[4] = '<br />- Ungültige Nachricht'; #Ungltiger Sicherheitscode $errormessage[5] = '<br />- Ungültiger Sicherheitscode'; #Ungltiger Zeichen (Spamverdacht) $errormessage[6] = '<br />- Ungültige Zeichen entdeckt'; #Alle Felder sind OK $okay = 'Vielen Dank für Ihre Nachricht, wir werden Sie demnächst bearbeiten!<br /><br />'; // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ####################################### ####################################### if(isset($_POST['submit'])) { ####################################### $name = check($_POST['name']); $email = check($_POST['email']); $betreff = check($_POST['betreff']); $nachricht = check($_POST['nachricht']); ####################################### $ip = $_SERVER['REMOTE_ADDR']; $host = gethostbyaddr($ip); ####################################### $zeit = time(); $datum = date ("d.m.Y", $zeit); $uhrzeit = date ("H:i:s", $zeit); ####################################### $message = '<span style="color:red">' . $errormessage[0]; if($name==''){$message .= $errormessage[1]; $fehler = 1;} if(!ereg("^[_a-zA-Z0-9-]+(\.[_a-zA-Z0-9-]+)*@([a-zA-Z0-9-]+\.)+([a-zA-Z]{2,6})$", $email)) { $message .= $errormessage[2]; $fehler = 1;} if($betreff==''){$message .= $errormessage[3]; $fehler = 1;} if($nachricht==''){$message .= $errormessage[4]; $fehler = 1;} if($_POST['code']=="" || strtolower($_POST['code'])!=$_SESSION['captcha_code']){ $message .= $errormessage[5]; $fehler = 1;} if(ehi_check()!=0){$message .= $errormessage[6]; $fehler = 1;} $message .= '</span><br /><br />'; ####################################### ####################################### if(!isset($fehler)){ $email_nachricht = "-- Kontakformularanfrage Lebe Kickboxarena --\n\nBetreff: $betreff"; $email_nachricht .= "\nName: $name\nE-Mailadresse: $email\nHomepage: $firma\n\n"; $email_nachricht .= "Nachricht:\n$nachricht\n\nIP: $ip\nHost: $host\n"; $email_nachricht .= "gesendet am $datum um $uhrzeit."; // Mail senden @mail($ihre_emailadresse, $email_betreffzeile, $email_nachricht, $email_absender); //Variablen resetten $name = ''; $betreff = ''; $email = ''; $nachricht = ''; $meldung=$okay; } else { $meldung=$message; } ####################################### ####################################### } //endissetsubmit else{$meldung='';} // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="Templates/normal.dwt.php" codeOutsideHTMLIsLocked="false" --> <head> <link rel="shortcut icon" href="icon.ico" ><meta name="keywords" content="Kickboxen, Lebe-Kickboxarena, Lebe, Training, Fitness, Windsbach, Jürgen leidel,lebe kickboxarena, Kindertraining/> <meta name="description" content="Wir Trainieren Jung wie Alt ob Geist oder Körper" /> <meta name="Lebe Kickboxarena" content="Spezialis" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <!-- InstanceBeginEditable name="doctitle" --> <title>Lebe-Kickboxarena & Co</title> <!-- InstanceEndEditable --> <link href="styles/thrColHybHdr.css" rel="stylesheet" type="text/css" /><!--[if IE]> <style type="text/css"> /* Fügen Sie CSS-Korrekturen für alle IE-Versionen in diesen bedingten Kommentar ein. */ .twoColHybLtHdr #sidebar1 { padding-top: 30px; } .twoColHybLtHdr #mainContent { zoom: 1; padding-top: 15px; } /* Mit der obigen proprietären Zoom-Eigenschaft wird IE die Eigenschaft hasLayout zugewiesen, die gegebenenfalls zur Verhinderung verschiedener Fehler erforderlich ist. */ </style> <![endif]--> <!-- InstanceBeginEditable name="head" --> <!-- InstanceEndEditable --> <style type="text/css"> <!-- body { background-color: #470006; } --> </style> <link href="styles/styles.css" rel="stylesheet" type="text/css" /> <script type="text/javascript"> <!-- function MM_preloadImages() { //v3.0 var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array(); var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++) if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}} } function MM_findObj(n, d) { //v4.01 var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) { d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);} if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n]; for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); if(!x && d.getElementById) x=d.getElementById(n); return x; } function MM_nbGroup(event, grpName) { //v6.0 var i,img,nbArr,args=MM_nbGroup.arguments; if (event == "init" && args.length > 2) { if ((img = MM_findObj(args[2])) != null && !img.MM_init) { img.MM_init = true; img.MM_up = args[3]; img.MM_dn = img.src; if ((nbArr = document[grpName]) == null) nbArr = document[grpName] = new Array(); nbArr[nbArr.length] = img; for (i=4; i < args.length-1; i+=2) if ((img = MM_findObj(args[i])) != null) { if (!img.MM_up) img.MM_up = img.src; img.src = img.MM_dn = args[i+1]; nbArr[nbArr.length] = img; } } } else if (event == "over") { document.MM_nbOver = nbArr = new Array(); for (i=1; i < args.length-1; i+=3) if ((img = MM_findObj(args[i])) != null) { if (!img.MM_up) img.MM_up = img.src; img.src = (img.MM_dn && args[i+2]) ? args[i+2] : ((args[i+1])? args[i+1] : img.MM_up); nbArr[nbArr.length] = img; } } else if (event == "out" ) { for (i=0; i < document.MM_nbOver.length; i++) { img = document.MM_nbOver[i]; img.src = (img.MM_dn) ? img.MM_dn : img.MM_up; } } else if (event == "down") { nbArr = document[grpName]; if (nbArr) for (i=0; i < nbArr.length; i++) { img=nbArr[i]; img.src = img.MM_up; img.MM_dn = 0; } document[grpName] = nbArr = new Array(); for (i=2; i < args.length-1; i+=2) if ((img = MM_findObj(args[i])) != null) { if (!img.MM_up) img.MM_up = img.src; img.src = img.MM_dn = (args[i+1])? args[i+1] : img.MM_up; nbArr[nbArr.length] = img; } } } //--> </script> </head> <body class="twoColHybLtHdr" onload="MM_preloadImages('image/bottum_home_a.jpg','image/bottum_home_h.jpg','image/bottum_location_a.jpg','image/bottum_location_h.jpg','image/bottum_training_a.jpg','image/bottum_training_h.jpg','image/bottum_trainerteam_a.jpg','image/bottum_trainerteam_h.jpg','image/bottum_preise_a.jpg','image/bottum_preise_h.jpg','image/bottum_kontakt_a.jpg','image/bottum_kontakt_h.jpg','image/bottum_leer_oben.jpg','image/bottum_leer_unten.jpg')"> <div id="container"> <div id="header"><img src="image/logo.jpg" alt="Logo des LebeKickboxarena" width="479" height="172" /> <!-- end #header --></div> <div id="sidebar1"> <table border="0" cellpadding="0" cellspacing="0"> <tr> <td><a href="javascript:;" target="_top" onClick="MM_nbGroup('down','group1','bottumleeroben','image/bottum_leer_oben.jpg',1)" onMouseOver="MM_nbGroup('over','bottumleeroben','image/bottum_leer_oben.jpg','image/bottum_leer_oben.jpg',1)" onMouseOut="MM_nbGroup('out')"><img name="bottumleeroben" src="image/bottum_leer_oben.jpg" border="0" alt="" onLoad="" /></a></td> </tr> <tr> <td><a href="index.php" target="_top" onclick="MM_nbGroup('down','group1','bottumhome','image/bottum_home_a.jpg',1)" onmouseover="MM_nbGroup('over','bottumhome','image/bottum_home_h.jpg','image/bottum_home_a.jpg',1)" onmouseout="MM_nbGroup('out')"><img src="image/bottum_home.jpg" alt="Home" name="bottumhome" width="150" height="25" border="0" id="bottumhome" onload="" /></a></td> </tr> <tr> <td><a href="location.php" target="_top" onClick="MM_nbGroup('down','group1','location','image/bottum_location_a.jpg',1)" onMouseOver="MM_nbGroup('over','location','image/bottum_location_h.jpg','image/bottum_location_a.jpg',1)" onMouseOut="MM_nbGroup('out')"><img name="location" src="image/bottum_location.jpg" border="0" alt="Location" onLoad="" /></a></td> </tr> <tr> <td><a href="training.php" target="_top" onClick="MM_nbGroup('down','group1','bottumtraining','image/bottum_training_a.jpg',1)" onMouseOver="MM_nbGroup('over','bottumtraining','image/bottum_training_h.jpg','image/bottum_training_a.jpg',1)" onMouseOut="MM_nbGroup('out')"><img name="bottumtraining" src="image/bottum_training.jpg" border="0" alt="Training" onLoad="" /></a></td> </tr> <tr> <td><a href="trainerteam.php" target="_top" onClick="MM_nbGroup('down','group1','bottumtrainerteam','image/bottum_trainerteam_a.jpg',1)" onMouseOver="MM_nbGroup('over','bottumtrainerteam','image/bottum_trainerteam_h.jpg','image/bottum_trainerteam_a.jpg',1)" onMouseOut="MM_nbGroup('out')"><img name="bottumtrainerteam" src="image/bottum_trainerteam.jpg" border="0" alt="Trainerteam" onLoad="" /></a></td> </tr> <tr> <td><a href="preise.php" target="_top" onClick="MM_nbGroup('down','group1','bottumpreise','image/bottum_preise_a.jpg',1)" onMouseOver="MM_nbGroup('over','bottumpreise','image/bottum_preise_h.jpg','image/bottum_preise_a.jpg',1)" onMouseOut="MM_nbGroup('out')"><img name="bottumpreise" src="image/bottum_preise.jpg" border="0" alt="Preise" onLoad="" /></a></td> </tr> <tr> <td><a href="kontakt.php" target="_top" onClick="MM_nbGroup('down','group1','bottumkontakt','image/bottum_kontakt_a.jpg',1)" onMouseOver="MM_nbGroup('over','bottumkontakt','image/bottum_kontakt_h.jpg','image/bottum_kontakt_a.jpg',1)" onMouseOut="MM_nbGroup('out')"><img name="bottumkontakt" src="image/bottum_kontakt.jpg" border="0" alt="Kontakt" onLoad="" /></a></td> </tr> <tr> <td><a href="javascript:;" target="_top" onClick="MM_nbGroup('down','group1','bottumleerunten','image/bottum_leer_unten.jpg',1)" onMouseOver="MM_nbGroup('over','bottumleerunten','image/bottum_leer_unten.jpg','image/bottum_leer_unten.jpg',1)" onMouseOut="MM_nbGroup('out')"><img name="bottumleerunten" src="image/bottum_leer_unten.jpg" border="0" alt="" onLoad="" /></a></td> </tr> </table> <p> </p> <!-- end #sidebar1 --></div> <div id="mainContent"><!-- InstanceBeginEditable name="inhalt" --> <form name="kontaktformular" action="<?php echo $_SERVER['kontaktformular/PHP_SELF']; ?>" method="post"> <table width="600%" border="0" align="left" style="width:400px; text-align: left; font-weight: bold;"> <tr> <td colspan="4"><?php echo $meldung; ?></td> </tr> <tr> <td style="width:150px"><span class="kontakt"><strong>Name:</strong></span></td> <td><span class="kontakt"> <input name="name" type="text" value="<?php echo $name; ?>" size="35" maxlength="100" style="filter:Chroma(color=#ffffff)"/> </span></td> <td></td> <td class="kontakt">Nachricht:</td> </tr> <tr> <td style="width:150px"><span class="kontakt"><strong>E-Mail Adresse:</strong><br /> </span></td> <td><span class="kontakt"> <input name="email" type="text" id="email" value="<?php echo $email; ?>" size="35" maxlength="100" style="filter:Chroma(color=#ffffff)"/> </span></td> <td></td> <td rowspan="6"><span class="kontakt"> <textarea name="nachricht" cols="40" rows="12" style="filter:Chroma(color=#ffffff)"><?php echo $nachricht; ?></textarea> </span></td> </tr> <tr> <td style="width:150px"><span class="kontakt"><strong>Betreff:</strong></span></td> <td><span class="kontakt"> <input name="betreff" type="text" value="<?php echo $betreff; ?>" size="35" maxlength="50" style="filter:Chroma(color=#ffffff)"/> </span></td> <td></td> </tr> <tr> <td style="width:150px"> </td> <td> </td> <td></td> </tr> <tr> <td style="width:150px"><span class="kontakt"><strong>Sicherheitscode:</strong></span></td> <td><div id="reloadit" style="width:124px;height:40px;text-align:center;border:0px solid black;"> <span class="kontakt"><img id="captcha" src="captcha.php?<?php echo SID; ?>" alt="captcha" /></span></div> <span class="kontakt"><a style="color:black;text-decoration:none;" href="javascript:reload_captcha();">Neuer Code</a></span></td> <td></td> </tr> <tr> <td style="width:150px"><span class="kontakt"><strong>Sicherheitscode <br /> wiederholen: </strong></span></td> <td><span class="kontakt"> <input name="code" type="text" size="20" maxlength="50" style="filter:Chroma(color=#ffffff)" /> </span></td> <td style="width:130px"> </td> </tr> <tr> <td style="width:150px"> </td> <td> </td> <td></td> </tr> <tr> <td style="width:150px"> </td> <td> </td> <td></td> <td><span class="kontakt"> <input type="hidden" name="PHPSESSID" value="<?php echo htmlspecialchars(session_id());?>" /> <input type="submit" value="Versenden" name="submit" /> </span></td> </tr> <tr> <td style=> </td> <td> </td> <td></td> <td> </td> </tr> </table> </form> <p> </p> <!-- InstanceEndEditable --> <!-- end #mainContent --></div> <!-- Dieses clear-Element sollte direkt auf das #mainContent-div folgen, um das #container-div anzuweisen, alle untergeordneten Floats aufzunehmen. --> <br class="clearfloat" /> <div id="footer"> <p>Lebe-Kickboxarena & Co <a href="kontakt.php">Kontakt</a> <a href="impressum.php">Impressum</a> <a href="weblogin.php">WebLogin</a></p> <!-- end #footer --></div> <!-- end #container --></div> </body> <!-- InstanceEnd --></html> <?php // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ function check($var){ $varsafe=trim(strip_tags($var)); return $varsafe; } function ehi_check(){ $achtung=0; foreach($_POST as $val){ $pos = strpos(strtolower($val), 'content-type:'); if($pos !== false){$achtung++;} $pos = strpos(strtolower($val), 'content-type'); if($pos !== false){$achtung++;} $pos = strpos(strtolower($val), 'bcc:'); if($pos !== false){$achtung++;} $pos = strpos(strtolower($val), 'bcc'); if($pos !== false){$achtung++;} } //endforeach return $achtung; // wenn Null dann Alles Okay } // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ?> </html>[/html] [/QUOTE]
Bilder bitte
hier hochladen
und danach über das Bild-Icon (Direktlink vorher kopieren) platzieren.
Zitate einfügen…
Authentifizierung
Wenn ▲ = 7, ▼ = 3, ◇ = 2 und die Summe von ▲ und ▼ durch ◇ geteilt wird, was ist das Ergebnis?
Antworten
Start
Forum
Sonstiges
Webdesign, Webentwicklung & Programmierung
PHP, Javascript, jQuery, Ajax, nodeJS, MySQL...
Kontaktformular ohne Fehler aber auch ohne Email
Oben