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:
91:
92:
93:
94:
95:
96:
97:
98:
99:
100:
101:
102: | <html>
<head>
<title>Bestellung</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="#D7E9DA" text="#003366" link="#CCCCCC" vlink="#CCCCCC" alink="#CCCCCC">
<?php
if($Submit){
if(strlen($name)<3){
$error_msg.="Bitte gebe Deinen Namen an.<br>";
}
if(strlen($vorname)<3){
$error_msg.="Bitte gebe Deinen Vornamen an.<br>";
}
if(!ereg("^[_a-zA-Z0-9-]+(.[_a-zA-Z0-9-]+)*@([a-zA-Z0-9-]+.)+([a-zA-Z]{2,4})$",$email)){
$error_msg.="Bitte gebe eine g¸ltige eMail-Adresse an.<br>";
}
if($error_msg){
//Eines der Felder wurde nicht korrekt ausgefüllt
echo "Deine Nachricht konnte aus folgenden Gründen leider nicht versendet werden:<br><br>";
echo $error_msg;
echo "<br>Bitte klicke auf <a href=javascript:history.back(1)>zurück</a> und fülle alle Felder aus.";
}else{
//Alle Felder ausgef¸llt - eMail generieren
$recipient="pachter@ddd-werbepraxis.de"; // #DEINE EMAIL ADRESSE#
$subject="Bestellung";
$header="From: " . $email . "n";
$mail_body.="Die Mail wurde am " . date("d.m.Y") . " um " . date("H:i") . "h verschickt!n";
$mail_body.="Folgendes wurde eingetragen:nn";
$mail_body.="Name:tt" . $name . "n";
$mail_body.="Vorname:t" . $vorname . "n";
$mail_body.="eMail:tt" . $email . "n";
$mail_body.="Telefon:t" . $telefon . "nn";
$mail_body.="Artikel-Nr.tAnzahltEinzelpreistArtikelbeschreibungn";
$mail_body.=$artnr . "t";
$mail_body.=$anzahl . "t";
$mail_body.=$preis . "tt";
$mail_body.=$artikel . "";
mail($recipient,$subject,$mail_body,$header);
//Formular ausgeführt!Meldung wird ausgegeben
echo "Danke für Ihre Bestellung.";
}
}else{
//Formular noch nicht ausgeführt!Formular wird angezeit
?>
<form action="<?php echo $PHP_SELF ?>" method=POST>
<span class="rot"><span class="bold10">BESTELLUNG<br>
<br>
</span></span><span class="rot"><span class="bold10">Achtung: Felder mit einem * müssen ausgefüllt werden!</span></span>
<table width="433" border="0" cellpadding="2" cellspacing="2">
<tr>
<td>Name:<span class="rot"><span class="bold10">*</span></span></td>
<td colspan="3" width="352"><input name="name" style=background-Color=#D7E9DA onFocus="this.style.backgroundColor='#CCFFCC'" onBlur="this.style.backgroundColor='#D7E9DA'" type="text" size="30"></td>
</tr>
<tr>
<td>Vorname:<span class="rot"><span class="bold10">*</span></span></td>
<td colspan="3" width="352"><input name="vorname" style=background-Color=#D7E9DA onFocus="this.style.backgroundColor='#CCFFCC'" onBlur="this.style.backgroundColor='#D7E9DA'" type="text" id="vorname" size="30"></td>
</tr>
<tr>
<td>eMail:<span class="rot"><span class="bold10">*</span></span></td>
<td colspan="3" width="352"><input name="email" style=background-Color=#D7E9DA onFocus="this.style.backgroundColor='#CCFFCC'" onBlur="this.style.backgroundColor='#D7E9DA'" type="text" size="30"></td>
</tr>
<tr>
<td>Telefon:</td>
<td colspan="3" width="352"><input name="telefon" style=background-Color=#D7E9DA onFocus="this.style.backgroundColor='#CCFFCC'" onBlur="this.style.backgroundColor='#D7E9DA'" type="text" size="30"></td>
</tr>
<tr>
<td colspan="4" align="left" valign="top">Ihre Bestellung:</td>
</tr>
<tr>
<td align="left" valign="top">Artikel-Nr:</td>
<td width="250">Bezeichnung</td>
<td width="30">Anzahl</td>
<td width="60">Einzelpreis</td>
</tr>
<tr>
<td align="left" valign="top"><input type="text" name="artnr" size="8" maxlength="8"></td>
<td width="250"><input type="text" name="artikel" size="24"></td>
<td width="30"><input type="text" name="anzahl" size="4" maxlength="4"></td>
<td width="60"><input type="text" name="preis" size="8"></td>
</tr>
<tr>
<td><input type="submit" style=background-Color=#D7E9DA onFocus="this.style.backgroundColor='#CCFFCC'" onBlur="this.style.backgroundColor='#D7E9DA'" name="Submit" value="Senden"></td>
<td width="250"></td>
<td width="30"></td>
<td width="60"></td>
</tr>
</table>
</form>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><div align="left"></div></td>
</tr>
</table>
<?php
}
?>
</body>
</html> |