| | | | |
| | |
| Neuer Benutzer Registriert seit: 12.11.2007
Beiträge: 4
![]() | ich hab ein problem mit der funktion mail() ich habe eigntl. alles richtig gemacht aber da kommt immer dieser fehler! Warning: mail() [function.mail]: Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in C:\xampp\xampp\htdocs\test.php on line 42 könnt ihr mir da bitte helfen??? hier nochmal mein quellcode: <html> <head> <title>Formular</title> </head> <body> <?php if (isset($_GET['submit'])) { $ausgabe = ''; $fehler = ''; if (isset($_GET['anzahl']) && !is_array($_GET['anzahl']) && $_GET['anzahl'] != '') { $ausgabe .= 'Anzahl Karten: ' . htmlspecialchars($_GET['anzahl']) . "\n"; } else { $fehler .= 'Keine Kartenanzahl ausgewählt!<br />'; } if (isset($_GET['sitztyp']) && !is_array($_GET['sitztyp']) && $_GET['sitztyp'] != '') { $ausgabe .= 'Art des Platzes: ' . htmlspecialchars($_GET['sitztyp']) . "\n"; } else { $fehler .= 'Keine Platzart ausgewählt!<br />'; } if (isset($_GET['posi']) && is_array($_GET['posi']) && count($_GET['posi']) > 0) { $ausgabe .= 'Ort des Platzes: ' . htmlspecialchars(implode(' ', $_GET['posi'])) . "\n"; } else { $fehler .= 'Keine Position ausgewählt!<br />'; } if (isset($_GET['zahlung']) && !is_array($_GET['zahlung']) && $_GET['zahlung'] != '') { $ausgabe .= 'Zahlungsart: ' . htmlspecialchars($_GET['zahlung']) . "\n"; } else { $fehler .= 'Keine Zahlungsart ausgewählt!<br />'; } if (isset($_GET['agb']) && !is_array($_GET['agb']) && $_GET['agb'] == 'ok') { $ausgabe .= 'AGB: ' . htmlspecialchars($_GET['agb']) . "\n"; } else { $fehler .= 'AGB nicht akzeptiert!<br />'; } if ($fehler == '') { mail('x@y.de', 'Daten aus Webformular', $ausgabe); echo '<b>Vielen Dank für Ihre Angaben!</b>'; echo '</body></html>'; exit(); } else { echo "<b>$fehler</b>"; } } ?> <h2>Welche Tickets?</h2> <p> <form action="<?php echo htmlspecialchars($_SERVER['PHP_SELF']); ?>" method="get"> <input type="text" name="anzahl" size="2" value="<?php if (isset($_GET['anzahl']) && !is_array($_GET['anzahl'])) { echo htmlspecialchars($_GET['anzahl']); } ?>" />Zahl der Karten<br /> <input type="radio" name="sitztyp" value="sitzpl" <?php if (isset($_GET['sitztyp']) && $_GET['sitztyp'] == 'sitzpl') { echo 'checked="checked" '; } ?>/>Sitzplatz oder <input type="radio" name="sitztyp" value="stehpl" <?php if (isset($_GET['sitztyp']) && $_GET['sitztyp'] == 'stehpl') { echo 'checked="checked" '; } ?>/>Stehplatz<br /> Bevorzugte Position <select name="posi[]" multiple="multiple" size="3"> <option value="nord"<?php if (isset($_GET['posi']) && is_array($_GET['posi']) && in_array('nord', $_GET['posi'])) { echo ' selected="selected"'; } ?>>Nordkurve</option> <option value="trib"<?php if (isset($_GET['posi']) && is_array($_GET['posi']) && in_array('trib', $_GET['posi'])) { echo ' selected="selected"'; } ?>>Tribüne</option> <option value="sued"<?php if (isset($_GET['posi']) && is_array($_GET['posi']) && in_array('sued', $_GET['posi'])) { echo ' selected="selected"'; } ?>>Südkurve</option> </select><br /> Zahlungsart <select name="zahlung"> <option value="">--- bitte auswählen ---</option> <option value="cc"<?php if (isset($_GET['zahlung']) && $_GET['zahlung'] == 'cc') { echo ' selected="selected"'; } ?>>Kreditkarte</option> <option value="bar"<?php if (isset($_GET['zahlung']) && $_GET['zahlung'] == 'bar') { echo ' selected="selected"'; } ?>>bar bei Abholung</option> <option value="teller"<?php if (isset($_GET['zahlung']) && $_GET['zahlung'] == 'teller') { echo ' selected="selected"'; } ?>>Tellerwäsche</option> </select><br /> <input type="checkbox" name="agb" value="ok" <?php if (isset($_GET['agb']) && $_GET['agb'] == 'ok') { echo 'checked="checked" '; } ?>/>Ich akzeptiere die AGB!<br /> <input type="submit" name="submit" value="Versenden" /> </form> </p> </body> </html> |
| |
| | |
| PHP Code Flüsterer Registriert seit: 21.08.2005 Beiträge: 4682 PHP-Kenntnisse: Fortgeschritten | |
| Themen-Optionen | |
| Thema bewerten | |
|
|
Ähnliche Themen | ||||
| Thema | Autor | Forum | Antworten | Letzter Beitrag |
| Problem mit mail() | Blue-Dragon | PHP Tipps 2008 | 17 | 05.07.2008 22:09 |
| [Erledigt] problem keine ausgabe | coraplanet | PHP Tipps 2008 | 12 | 02.05.2008 18:51 |
| Mail problem | Marian | PHP Tipps 2005-2 | 11 | 27.09.2005 18:15 |
| mail(); + Array = Problem | PHP Tipps 2005-2 | 5 | 15.08.2005 16:45 | |
| mail von lokalem Server an SMTP im Netz -after_pop- Problem | PHP-Fortgeschrittene | 7 | 12.08.2005 14:40 | |
| Problem ! Mail mit PHP vom Freenet-Server | pit62 | PHP Tipps 2005 | 3 | 09.02.2005 09:22 |
| Problem mit mail datei im mbox fomat | PHP-Fortgeschrittene | 3 | 08.02.2005 15:24 | |
| Problem bei Massenmails versenden mit der Funktion mail | PHP-Fortgeschrittene | 3 | 19.01.2005 13:36 | |
| Problem mit dem mail() | PHP Tipps 2005 | 10 | 18.01.2005 21:13 | |
| mail() problem | Trumpfass | PHP Tipps 2004-2 | 3 | 20.12.2004 20:07 |
| mail() Problem mit emailadresse mit "-" [gelöst] | wishy | PHP Tipps 2004-2 | 2 | 15.12.2004 11:36 |
| Mail Problem | PHP Tipps 2004-2 | 3 | 13.12.2004 22:43 | |
| Problem mit Formular + Mail To+ PHP-Seiten weiterleitung | HTML, Usability und Barrierefreiheit | 3 | 27.08.2004 11:06 | |
| Problem mit Mail | PHP Tipps 2004 | 15 | 02.08.2004 22:55 | |
| mail() - problem | PHP Tipps 2004 | 2 | 12.07.2004 00:17 | |
| Besucher kamen über folgende Suchanfragen bei Google auf diese Seite |
| php ini set smtp freenet, && $_get[\'mail\'] != |