YourWBB


yourWBB » yourWBB Misc * » Das Proggen » HTML, XHTML, JavaScript & CSS » Formmailer PHP Datei » Hallo Gast [Anmelden|Registrieren]
Letzter Beitrag | Erster ungelesener Beitrag 2.012 Views | | Thema zu Favoriten hinzufügen

Neues Thema erstellen Antwort erstellen

Zum Ende der Seite springen Formmailer PHP Datei
Autor
Beitrag « Vorheriges Thema | Nächstes Thema »
websurfer1989
Mitglied


Dabei seit: 22.01.04
Beiträge: 65
Forenversion: 2.3

 Formmailer PHP Datei Antworten Zitieren Editieren Melden       UP

Hallo,

Habe ein großes Problem...
Ich hab mit nem Proggi ne html datei erstellt also ein Formular, das funktioniert auch tipp top, aber jetzt brauch ich noch ne formmailer.php datei damit die inhalte per email an mich gesendet werden. Leider hab ich kein Plan was in die Datei reinmuss und ne andere umzuschreiben hab ich leider auch nicht hingekriegt!
Hier mal meine HTML Datei:

code:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:

<html>
<head>
<meta http-equiv="Content-Language" content="de">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="generator" content="Formular-Maker">
<title>scooter-tuners.de - Shopformular</title>

<style type="text/css">
body {background-color:#FFFFFF; font-family:"Arial";}
h1.farbig {color:#000000; font-family:"Arial"; font-size:20px;}
tr {font-family:"Arial"; font-size:12px;}
td.farbig {font-family:"Arial"; font-size:12px;}
p.farbig {color:#000000; font-family:"Arial"; font-size:12px;}
p.anno {color:#000000; font-family:"Arial"; font-size:12px;}
</style>
<script language=javaScript><!--
function checkSenderMail(){
if(document.ShopFormular.SenderMail.value.length==0)
    return false;
  for(i=0;i<document.ShopFormular.SenderMail.value.length;i++){
    if((document.ShopFormular.SenderMail.value.charAt(i)<"-") ||
      (document.ShopFormular.SenderMail.value.charAt(i)=="/") ||
      ((document.ShopFormular.SenderMail.value.charAt(i)>"9") && (document.ShopFormular.SenderMail.value.charAt(i)<"@")) ||
      ((document.ShopFormular.SenderMail.value.charAt(i)>"Z") && (document.ShopFormular.SenderMail.value.charAt(i)<"a") && (document.ShopFormular.SenderMail.value.charAt(i)!="_")) ||
      (document.ShopFormular.SenderMail.value.charAt(i)>"z") ||
      (document.ShopFormular.SenderMail.value.indexOf('@')==-1) ||
      (document.ShopFormular.SenderMail.value.indexOf('.')==-1) ){
        return false;
    }
  }
  return true;
}
  function chkFormular()
   {
            if(!checkSenderMail()){
      alert("Bitte eine gültige E-Mail-Adresse eingeben");
      document.ShopFormular.SenderMail.focus();
      return false;
}
   }
//--></script>
</head>
<body >
<div align="center">
<h1 class="farbig">scooter-tuners.de Shopformular</h1>
<p class="anno">Mit diesem Formular kannst du deine Bestellung an uns senden!<br><br><b>Hinweis: <b>Das Absenden der Bestellung verpflichtet zum Kauf!</p>
<form name="ShopFormular" action="http://www.gangstaz4life.de/ditechrulez/shop/formmailer.php" method=POST onSubmit="return chkFormular()">

<input type="hidden" name="typ_sender" value="0">
<input type="hidden" name="copy" value="send_yes">
<input type="hidden" name="goto" value="http://www.gangstaz4life.de/ditechrulez/shop/danke.html">
<input type="hidden" name="email" value="websurfer1989@gmx.de" >
<input type="hidden" name="email2" value="lechner-kirchheim@gmx.de" >
<input type="hidden" name="betreff" value="scooter-tuners.de Shopformular" >

<table cellpadding="3" cellspacing="2">
<tr valign="middle" height="25">
<td class="farbig" align="right">Anzahl - Aufkleber GROß, schwarz</td>
<td class="farbig"><select size="1" name="1."><option value="0">0</option><option value="1">1</option><option value="2">2</option><option value="3">3</option><option value="4">4</option><option value="5">5</option><option value="6">6</option><option value="7">7</option><option value="8">8</option><option value="9">9</option><option value="10">10</option></select></td>
</tr>
<tr valign="middle" height="25">
<td class="farbig" align="right">Anzahl - Aufkleber GROß, weiss</td>
<td class="farbig"><select size="1" name="2."><option value="0">0</option><option value="1">1</option><option value="2">2</option><option value="3">3</option><option value="4">4</option><option value="5">5</option><option value="6">6</option><option value="7">7</option><option value="8">8</option><option value="9">9</option><option value="10">10</option></select></td>
</tr>
<tr valign="middle" height="25">
<td class="farbig" align="right">Anzahl - Aufkleber KLEIN, schwarz</td>
<td class="farbig"><select size="1" name="3."><option value="0">0</option><option value="1">1</option><option value="2">2</option><option value="3">3</option><option value="4">4</option><option value="5">5</option><option value="6">6</option><option value="7">7</option><option value="8">8</option><option value="9">9</option><option value="10">10</option></select></td>
</tr>
<tr valign="middle" height="25">
<td class="farbig" align="right">Anzahl - Aufkleber KLEIN, weiss</td>
<td class="farbig"><select size="1" name="4."><option value="0">0</option><option value="1">1</option><option value="2">2</option><option value="3">3</option><option value="4">4</option><option value="5">5</option><option value="6">6</option><option value="7">7</option><option value="8">8</option><option value="9">9</option><option value="10">10</option></select></td>
</tr>
<tr valign="middle" height="25">
<td class="farbig" align="right"><b>deine Emailadresse:<b></td>
<td class="farbig"><input type="text" name="SenderMail" value="" size="20" MaxLength="40"></td>
</tr>
<tr><td align="center" colspan="2">
<input type="submit" name="next" value="Bestellung senden">
<input type="reset" name="next" value="Zurücksetzen">
<input type="button" name="print" value="Seite drucken" onClick="javascript:window.print()">
</td></tr>
</table>
</form>
</div>
</body>
</html>



Kann mir einer dazu sonne PHP Datei schreiben dass die Inhalte dann an mich gesendet werden? Email steht ja schon oben im Script.
Außerdem soll wie oben im Script zu sehen sollen die User nach dem versenden auf die folgende Seite geleitet werden:
http://www.gangstaz4life.de/ditechrulez/shop/danke.html

greetz
20.05.06 19:43 websurfer1989 ist offline E-Mail Finden Als Freund hinzufügen
24Bytes 24Bytes ist männlich
Der Coolste


Dabei seit: 19.07.06
Beiträge: 2.909
Fähigkeiten: WBB3 Anfänger; WBB2 Profi; WBB Lite 2 Anfänger; WBB Lite 1 Fortgeschritten
Forenversion: 3.0; 2.3

Antworten Zitieren Editieren Melden       UP

hi,
hier:
php:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
<?php
$inhalt='Guten Tag,\n
das Formular auf ihrer Homepage wurde mit folgenden Daten augefült:\n\n
Feld 1.: '.$_POST['1.'].'\n
Feld 2.: '.$_POST['2.'].'\n
Feld 3.: '.$_POST['3.'].'\n
Feld 4.: '.$_POST['4.'].'\n
Feld E-Mail.: '.$_POST['SenderMail'].'\n\n
MfG Formular!\n';
if(!$_POST['1.']){
  $error="1.<br />";
}
if(!$_POST['2.']){
  $error.="2.<br />";
}
if(!$_POST['3.']){
  $error.="3.<br />";
}
if(!$_POST['4.']){
  $error.="4.<br />";
}
if(!$error){
  @mail($_POST['email'], $_POST['betreff'], $inhalt"From: $_POST['SenderMail']\n");
}else{
  echo "Folgende Felder müssen sie noch ausfüllen:<br />".$error;
}
?>

ist aber ungetestet, fehler bitte posten!

__________________
Online Passwort Generator

Dieser Beitrag wurde 1 mal editiert, zum letzten Mal von 24Bytes: 20.05.06 22:54.

20.05.06 22:54 24Bytes ist offline E-Mail Finden Als Freund hinzufügen
Baumstruktur | Brettstruktur
Gehe zu:

Neues Thema erstellen Antwort erstellen

yourWBB » yourWBB Misc * » Das Proggen » HTML, XHTML, JavaScript & CSS » Formmailer PHP Datei