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:
|
<?php if ( isset( $_REQUEST["do"] ) && $_REQUEST["do"] == "send" )
{
// Variablen auslesen
$to = "email@email.de";
$from = $_REQUEST["form_from"];
$email = $_REQUEST["form_email"];
$subject = $_REQUEST["form_subject"];
$telefon = $_REQUEST["form_telefon"];
$text = $_REQUEST["form_text"];
$header = "From: " . $from;
//Pflichtfelder
if (! isset( $from ) || $from = "" )
{
echo ("Bitte geben Sie ihren Namen an");
}
if ( ! isset( $subject ) || $subject = "" )
{
echo ("Bitte geben Sie ein Betreff an!");
}
if ( ! isset( $text ) || $text = "" )
{
echo ("Bitte geben Sie einen Text ein");
}
$status = mail($to, $subject, $text, $header, $email, $from);
if ( ! $status )
{
echo("Konnte die Email nicht versenden");
}
}
?>
<form action="<?php echo $_REQUEST["PHP_SELF"]; ?>" method="POST" name="FormName">
<table width="550" border="0" cellspacing="0" cellpadding="2">
<tr>
<td align="left" valign="top" width="80"><b>Name:</b></td>
<td align="left" valign="top" width="363"><input type="text" name="form_from" size="65" border="0"></td>
<td align="left" valign="top" width="95"> </td>
</tr>
<tr>
<td align="left" valign="top" width="80"><b>Email:</b></td>
<td align="left" valign="top" width="363"><input type="text" name="form_email" size="65" border="0"></td>
<td align="left" valign="top" width="95"> </td>
</tr>
<tr>
<td align="left" valign="top" width="80"><b>Telefon:</b></td>
<td align="left" valign="top" width="462"><input type="text" name="form_telefon" size="65" border="0">
</td>
</tr>
<tr>
<td align="left" valign="top" width="80"><b>Betreff:</b></td>
<td align="left" valign="top" width="363"><input type="text" name="form_subject" size="65" border="0"></td>
<td align="left" valign="top" width="95"> </td>
</tr>
<tr>
<td border="0"> </td>
</tr>
<tr>
<td align="left" valign="top" width="80"><b>Text:</b></td>
<td colspan="2" align="left" valign="top" width="462"><textarea name="form_text" rows="8" cols="49"></textarea> </td>
</tr>
<tr>
<td align="left" valign="top" width="80"> </td>
<td align="left" valign="top" width="363"> </td>
<td align="left" valign="top" width="95"> </td>
</tr>
<tr>
<td align="left" valign="top" width="80"><input type="hidden" name="do" value="send"></td>
<td align="left" valign="top" width="363"><input type="submit" name="submit" value="Abschicken" border="0"></td>
<td align="left" valign="top" width="95"> </td>
</tr>
</table></form> |