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...
brauche hilfe für mein Kontaktformular mit php script
Beitrag
<blockquote data-quote="Hammelmen" data-source="post: 1685858" data-attributes="member: 401819"><p>Hallo Leute ich habe da so eine kleines problem und zwar mit dem Kontaktformular.</p><p></p><p></p><p></p><p>Im dreamweaver wird es richtig angezeigt, aber wenn ich es hoch lade</p><p>wird es nicht richtig angezeigt.</p><p></p><p>der code:</p><p></p><p></p><p></p><p> [HTML] <div id="content"></p><p> <div id="column-up"></p><p> <div class="column-left1"></p><p> </p><p> </div></p><p> <div class="column-right1"></p><p></p><p><form id="form" name="form" method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>?action=send"></p><p></p><p><table width="400" cellpadding="2" cellspacing="2" style="font-family:Geneva, Arial, Helvetica, sans-serif; font-size:12px"></p><p></p><p><tr></p><p></p><p><td width="162"></p><p><strong>Ihr Name</strong></td></p><p></p><p><td width="188"></p><p></p><p><input name="name" type="text" id="name" style="font-size:12px; font-family:Geneva, Arial, Helvetica, sans-serif; border : 1px solid #000000; width:186px" value="<?php echo $_POST['name']; ?>"/></td></p><p><td width="28" align="center" valign="middle"><img src="http://www.psd-tutorials.de/forum/images/hilfeicon.gif" alt="Hilfe" width="15" height="15" title="Bitte geben Sie Ihren Namen an, damit wir Sie pers&ouml;nlich ansprechen k&ouml;nnen!" /></td></p><p></tr></p><p></p><p><tr></p><p></p><p><td width="162"></p><p><strong>Ihre g&uuml;ltige E-Mail Adresse</strong></td></p><p></p><p><td width="188"></p><p></p><p><input name="email" type="text" id="email" style="font-size:12px; font-family:Geneva, Arial, Helvetica, sans-serif; border : 1px solid #000000; width:186px" value="<?php echo $_POST['email']; ?>"/></td></p><p><td width="28" align="center" valign="middle"><img src="http://www.psd-tutorials.de/forum/images/hilfeicon.gif" alt="Hilfe" width="15" height="15" title="Ihre aktuelle, g&uuml;ltige E-Mail Adresse, an der wir Ihnen antworten!" /></td></p><p></tr></p><p></p><p><tr></p><p></p><p><td width="162"></p><p><strong>Ihre Nachricht</strong></td></p><p></p><p><td width="188"></p><p></p><p><textarea name="message" id="message" style="font-size:12px; font-family:Geneva, Arial, Helvetica, sans-serif; border : 1px solid #000000; width:186px; height:100px" rows="4" cols="15"><?php echo $_POST['message']; ?></textarea></td></p><p><td width="28" align="center" valign="middle"><img src="http://www.psd-tutorials.de/forum/images/hilfeicon.gif" alt="Hilfe" width="15" height="15" title="Bitte formulieren Sie Ihr Anliegen m&ouml;glichst detailliert!" /></p><p></p><p></td></p><p></p><p></tr></p><p></p><p><tr></p><p></p><p><td width="162" ></p><p></p><p><strong>Wieviel ist <?php echo $Zahl_1; ?> plus <?php echo $Zahl_2; ?>?</strong></p><p></p><p></td></p><p></p><p><td></p><p></p><p><input name="number" type="hidden" id="number" value="<?php echo md5(( $Zahl_1 + $Zahl_2 )); ?>"/></p><p><input name="arithmetic" type="text" id="arithmetic" style="font-size:12px; font-family:Geneva, Arial, Helvetica, sans-serif; border : 1px solid #000000; width:186px" onfocus="if(this.value=='Das Ergebnis bitte hier hinein...')this.value=''" onblur="if(this.value=='')this.value='Das Ergebnis bitte hier hinein...'" value="Das Ergebnis bitte hier hinein..."/></p><p></p><p></td></p><p></p><p><td align="center" valign="middle"></p><p></p><p><img src="http://www.psd-tutorials.de/forum/images/hilfeicon.gif" alt="Hilfe" width="15" height="15" title="Spamschutz: Addieren Sie bitte <?php echo $Zahl_1; ?> und <?php echo $Zahl_2; ?> und schreiben Sie deren Summe in das Textfeld." /></p><p></p><p></td></p><p></p><p></tr></p><p></p><p><tr></p><p></p><p><td style="background-image: url(hintergrund.jpg)"></p><p><strong>M&ouml;gliche Aktionen</strong></p><p></td></p><p></p><p><td></p><p></p><p></td></p><p></p><p><td align="center" valign="middle"><img src="http://www.psd-tutorials.de/forum/images/hilfeicon.gif" alt="Hilfe" width="15" height="15" title="Sie k&ouml;nnen das Formular absenden oder zur&uuml;cksetzen!" /></td></p><p></p><p></tr></p><p></p><p><tr></p><p></p><p><td><strong>Sie ben&ouml;tigen Hilfe? </strong></td></p><p><td colspan="2">Mit dem Mauszeiger auf das Fragezeichen zeigen und Hilfe naht :-)</td></p><p></p><p></tr></p><p> </p><p></table></p><p></p><p></form>[/HTML]</p><p>[PHP]</p><p></p><p><?php</p><p></p><p></p><p>if($_GET['action'] != "" && !empty($_POST['name']) && !empty($_POST['email']) && !empty($_POST['message']) && ereg ("^[0-9a-zA-Z]([-_.]?[0-9a-zA-Z])*@[0-9a-z]([-.]?[0-9a-z])*\\.[a-z]{2,3}$", $_POST['email']))</p><p>{</p><p>setcookie("spam_protection", "spam_protection", time()+500);</p><p>}</p><p></p><p>$Zahl_1 = intval(rand(1, 5));</p><p>$Zahl_2 = intval(rand(1, 5));</p><p></p><p>?></p><p></p><p><?php</p><p></p><p>if($_COOKIE["spam_protection"] != "spam_protection")</p><p>{</p><p></p><p>?></p><p></p><p><input name="submit" type="submit" id="submit" value="Senden" /> <input name="reset" type="reset" id="reset" value="Zur&uuml;cksetzen" /></p><p></p><p><?php</p><p></p><p>}</p><p></p><p>if($_COOKIE["spam_protection"] == "spam_protection")</p><p>{</p><p></p><p>?></p><p></p><p><input name="submit" type="submit" id="submit" value="Senden" disabled="true" /> <input name="reset" type="reset" id="reset" value="Zur&uuml;cksetzen" /></p><p></p><p><?php</p><p></p><p>}</p><p></p><p>?></p><p></p><p><?php</p><p></p><p>if($_GET['action'] == "send")</p><p>{</p><p></p><p>if($_COOKIE["spam_protection"] != "spam_protection")</p><p>{</p><p></p><p>if($_POST['number'] != md5($_POST['arithmetic']))</p><p>{</p><p></p><p>echo "<p><img src=\"stop.gif\" width=\"20\" height=\"20\" alt=\"Fehler\" /> <font style=\"color:darkred; font-family:Geneva, Arial, Helvetica, sans-serif; font-size:16px\"><b>Die Rechenaufgabe wurde falsch gel&ouml;st!</b></font></p>";</p><p></p><p>}</p><p></p><p>if($_POST['number'] == md5($_POST['arithmetic']))</p><p>{</p><p></p><p>if(!ereg ("^[0-9a-zA-Z]([-_.]?[0-9a-zA-Z])*@[0-9a-z]([-.]?[0-9a-z])*\\.[a-z]{2,3}$", $_POST['email']))</p><p>{</p><p></p><p>echo "<p><img src=\"stop.gif\" width=\"20\" height=\"20\" alt=\"Fehler\" /> <font style=\"color:darkred; font-family:Geneva, Arial, Helvetica, sans-serif; font-size:16px\"><b>Die eingegebene E-Mail-Adresse ist ung&uuml;ltig!</b></font></p>";</p><p></p><p>}</p><p></p><p>if(ereg ("^[0-9a-zA-Z]([-_.]?[0-9a-zA-Z])*@[0-9a-z]([-.]?[0-9a-z])*\\.[a-z]{2,3}$", $_POST['email']))</p><p>{</p><p></p><p>if(!empty($_POST['name']) && !empty($_POST['email']) && !empty($_POST['message']))</p><p>{</p><p></p><p>$name = nl2br(stripslashes(htmlspecialchars($_POST['name'])));</p><p>$IP = getenv("REMOTE_ADDR");</p><p></p><p>$absender = preg_replace( "/[^a-z0-9 !?:;,.\/_\-=+@#$&\*\(\)]/im", "", $_POST['email'] );</p><p>$absender = preg_replace( "/(content-type:|bcc:|cc:|to:|from:)/im", "", $absender );</p><p></p><p>$nachricht = nl2br(stripslashes(htmlspecialchars($_POST['message'])));</p><p></p><p>$mailnachricht = "Hallo!\n\nEs ist eine neue Nachricht fuer Sie eingetroffen:\n\n---------------------------------------------\n\nName:\n$name\n\nIP:\n$IP\n\nE-Mail:\n$absender\n\nNachricht:\n$nachricht\n\n---------------------------------------------\n\nSie koennen dem Absender der Nachricht direkt antworten, indem Sie einfach auf diese E-Mail antworten.\n\nMfG\nBotty ;-)";</p><p></p><p>mail("Ihre@E-Mail.de", "Neue Nachricht fuer Sie!", $mailnachricht, "From: $name <$absender>");</p><p></p><p>echo "<p><img src=\"ok.gif\" width=\"20\" height=\"20\" alt=\"Okay\" /> <font style=\"color:darkgreen; font-family:Geneva, Arial, Helvetica, sans-serif; font-size:16px\"><b>Vielen Dank f&uuml;r Ihre Nachricht!</b> Wir lassen Ihnen umgehend eine Antwort zukommen.</font></p>";</p><p></p><p>}</p><p></p><p>else</p><p></p><p>{</p><p></p><p>echo "<p><img src=\"stop.gif\" width=\"20\" height=\"20\" alt=\"Fehler\" /> <font style=\"color:darkred; font-family:Geneva, Arial, Helvetica, sans-serif; font-size:16px\"><b>Bitte f&uuml;llen Sie alle Felder aus!</b></font></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>[/PHP]</p></blockquote><p></p>
[QUOTE="Hammelmen, post: 1685858, member: 401819"] Hallo Leute ich habe da so eine kleines problem und zwar mit dem Kontaktformular. Im dreamweaver wird es richtig angezeigt, aber wenn ich es hoch lade wird es nicht richtig angezeigt. der code: [HTML] <div id="content"> <div id="column-up"> <div class="column-left1"> </div> <div class="column-right1"> <form id="form" name="form" method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>?action=send"> <table width="400" cellpadding="2" cellspacing="2" style="font-family:Geneva, Arial, Helvetica, sans-serif; font-size:12px"> <tr> <td width="162"> <strong>Ihr Name</strong></td> <td width="188"> <input name="name" type="text" id="name" style="font-size:12px; font-family:Geneva, Arial, Helvetica, sans-serif; border : 1px solid #000000; width:186px" value="<?php echo $_POST['name']; ?>"/></td> <td width="28" align="center" valign="middle"><img src="http://www.psd-tutorials.de/forum/images/hilfeicon.gif" alt="Hilfe" width="15" height="15" title="Bitte geben Sie Ihren Namen an, damit wir Sie persönlich ansprechen können!" /></td> </tr> <tr> <td width="162"> <strong>Ihre gültige E-Mail Adresse</strong></td> <td width="188"> <input name="email" type="text" id="email" style="font-size:12px; font-family:Geneva, Arial, Helvetica, sans-serif; border : 1px solid #000000; width:186px" value="<?php echo $_POST['email']; ?>"/></td> <td width="28" align="center" valign="middle"><img src="http://www.psd-tutorials.de/forum/images/hilfeicon.gif" alt="Hilfe" width="15" height="15" title="Ihre aktuelle, gültige E-Mail Adresse, an der wir Ihnen antworten!" /></td> </tr> <tr> <td width="162"> <strong>Ihre Nachricht</strong></td> <td width="188"> <textarea name="message" id="message" style="font-size:12px; font-family:Geneva, Arial, Helvetica, sans-serif; border : 1px solid #000000; width:186px; height:100px" rows="4" cols="15"><?php echo $_POST['message']; ?></textarea></td> <td width="28" align="center" valign="middle"><img src="http://www.psd-tutorials.de/forum/images/hilfeicon.gif" alt="Hilfe" width="15" height="15" title="Bitte formulieren Sie Ihr Anliegen möglichst detailliert!" /> </td> </tr> <tr> <td width="162" > <strong>Wieviel ist <?php echo $Zahl_1; ?> plus <?php echo $Zahl_2; ?>?</strong> </td> <td> <input name="number" type="hidden" id="number" value="<?php echo md5(( $Zahl_1 + $Zahl_2 )); ?>"/> <input name="arithmetic" type="text" id="arithmetic" style="font-size:12px; font-family:Geneva, Arial, Helvetica, sans-serif; border : 1px solid #000000; width:186px" onfocus="if(this.value=='Das Ergebnis bitte hier hinein...')this.value=''" onblur="if(this.value=='')this.value='Das Ergebnis bitte hier hinein...'" value="Das Ergebnis bitte hier hinein..."/> </td> <td align="center" valign="middle"> <img src="http://www.psd-tutorials.de/forum/images/hilfeicon.gif" alt="Hilfe" width="15" height="15" title="Spamschutz: Addieren Sie bitte <?php echo $Zahl_1; ?> und <?php echo $Zahl_2; ?> und schreiben Sie deren Summe in das Textfeld." /> </td> </tr> <tr> <td style="background-image: url(hintergrund.jpg)"> <strong>Mögliche Aktionen</strong> </td> <td> </td> <td align="center" valign="middle"><img src="http://www.psd-tutorials.de/forum/images/hilfeicon.gif" alt="Hilfe" width="15" height="15" title="Sie können das Formular absenden oder zurücksetzen!" /></td> </tr> <tr> <td><strong>Sie benötigen Hilfe? </strong></td> <td colspan="2">Mit dem Mauszeiger auf das Fragezeichen zeigen und Hilfe naht :-)</td> </tr> </table> </form>[/HTML] [PHP] <?php if($_GET['action'] != "" && !empty($_POST['name']) && !empty($_POST['email']) && !empty($_POST['message']) && ereg ("^[0-9a-zA-Z]([-_.]?[0-9a-zA-Z])*@[0-9a-z]([-.]?[0-9a-z])*\\.[a-z]{2,3}$", $_POST['email'])) { setcookie("spam_protection", "spam_protection", time()+500); } $Zahl_1 = intval(rand(1, 5)); $Zahl_2 = intval(rand(1, 5)); ?> <?php if($_COOKIE["spam_protection"] != "spam_protection") { ?> <input name="submit" type="submit" id="submit" value="Senden" /> <input name="reset" type="reset" id="reset" value="Zurücksetzen" /> <?php } if($_COOKIE["spam_protection"] == "spam_protection") { ?> <input name="submit" type="submit" id="submit" value="Senden" disabled="true" /> <input name="reset" type="reset" id="reset" value="Zurücksetzen" /> <?php } ?> <?php if($_GET['action'] == "send") { if($_COOKIE["spam_protection"] != "spam_protection") { if($_POST['number'] != md5($_POST['arithmetic'])) { echo "<p><img src=\"stop.gif\" width=\"20\" height=\"20\" alt=\"Fehler\" /> <font style=\"color:darkred; font-family:Geneva, Arial, Helvetica, sans-serif; font-size:16px\"><b>Die Rechenaufgabe wurde falsch gelöst!</b></font></p>"; } if($_POST['number'] == md5($_POST['arithmetic'])) { if(!ereg ("^[0-9a-zA-Z]([-_.]?[0-9a-zA-Z])*@[0-9a-z]([-.]?[0-9a-z])*\\.[a-z]{2,3}$", $_POST['email'])) { echo "<p><img src=\"stop.gif\" width=\"20\" height=\"20\" alt=\"Fehler\" /> <font style=\"color:darkred; font-family:Geneva, Arial, Helvetica, sans-serif; font-size:16px\"><b>Die eingegebene E-Mail-Adresse ist ungültig!</b></font></p>"; } if(ereg ("^[0-9a-zA-Z]([-_.]?[0-9a-zA-Z])*@[0-9a-z]([-.]?[0-9a-z])*\\.[a-z]{2,3}$", $_POST['email'])) { if(!empty($_POST['name']) && !empty($_POST['email']) && !empty($_POST['message'])) { $name = nl2br(stripslashes(htmlspecialchars($_POST['name']))); $IP = getenv("REMOTE_ADDR"); $absender = preg_replace( "/[^a-z0-9 !?:;,.\/_\-=+@#$&\*\(\)]/im", "", $_POST['email'] ); $absender = preg_replace( "/(content-type:|bcc:|cc:|to:|from:)/im", "", $absender ); $nachricht = nl2br(stripslashes(htmlspecialchars($_POST['message']))); $mailnachricht = "Hallo!\n\nEs ist eine neue Nachricht fuer Sie eingetroffen:\n\n---------------------------------------------\n\nName:\n$name\n\nIP:\n$IP\n\nE-Mail:\n$absender\n\nNachricht:\n$nachricht\n\n---------------------------------------------\n\nSie koennen dem Absender der Nachricht direkt antworten, indem Sie einfach auf diese E-Mail antworten.\n\nMfG\nBotty ;-)"; mail("Ihre@E-Mail.de", "Neue Nachricht fuer Sie!", $mailnachricht, "From: $name <$absender>"); echo "<p><img src=\"ok.gif\" width=\"20\" height=\"20\" alt=\"Okay\" /> <font style=\"color:darkgreen; font-family:Geneva, Arial, Helvetica, sans-serif; font-size:16px\"><b>Vielen Dank für Ihre Nachricht!</b> Wir lassen Ihnen umgehend eine Antwort zukommen.</font></p>"; } else { echo "<p><img src=\"stop.gif\" width=\"20\" height=\"20\" alt=\"Fehler\" /> <font style=\"color:darkred; font-family:Geneva, Arial, Helvetica, sans-serif; font-size:16px\"><b>Bitte füllen Sie alle Felder aus!</b></font></p>"; } } } } } ?> [/PHP] [/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...
brauche hilfe für mein Kontaktformular mit php script
Oben