Gegen Bilderklau - Das Original (https://www.gegen-bilderklau.net/index.php)
- Design, Website, Copyright (https://www.gegen-bilderklau.net/board.php?boardid=80)
--- Homepagehilfe (https://www.gegen-bilderklau.net/board.php?boardid=27)
---- Homepagehilfe - Archiv (https://www.gegen-bilderklau.net/board.php?boardid=139)
----- [PHP & MySQL] Formulare an E-Mail Adresse schicken (https://www.gegen-bilderklau.net/thread.php?threadid=139181)
Geschrieben von WuLana am 17.08.2008 um 20:27:
Formulare an E-Mail Adresse schicken
Hi Leut eich hab ein großes Problem also:
Ich hab mri mit Dreamweaver ein Formular gemacht nur ist das Problem wo ich meine E-Mai Adresse einfügen mus damit er mir die Formulare an meine E-Mail Adresse schickt hier der Code:
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:
91:
92:
93:
94:
95:
96:
97:
98:
99:
100:
101:
102:
103:
104:
105:
106:
107:
108:
109:
110:
111:
112:
113:
114:
115:
116:
117:
118:
119:
120:
121:
122:
123:
124:
125:
126:
127:
128:
129:
|
<html>
<head>
<title>Lucky Horse Stable</title>
<style type="text/css">
<!--
a {color: black;text-decoration: none;}
a:hover {color: black;text-decoration: none;}
.Stil2 {
color: #660000;
font-size: 24px;
}
.Stil4 {color: #660000; font-size: 12px; }
.Stil12 {
font-size: 12px;
font-family: "Comic Sans MS";
}
.Stil13 {color: #660000}
.Stil14 {color: #660000; font-size: 18px; }
.Stil16 {color: #660000; font-size: 16px; font-weight: bold; }
-->
</style>
</head>
<body style="margin: 0px;">
<div id="Hauptframe" style="position: absolute; left: 199px; top: 179px; width: 1046px; height: 704px; overflow: auto; font-family: Verdana; font-size: 36px; color: black">
<div align="center">
<p> </p>
<p class="Stil13">Futtershop</p>
<p class="Stil14">Formulare</p>
<form name="form1" method="post" action="">
<p class="Stil16">Kraftfutter</p>
<table width="400" border="0">
<tr>
<td width="61" class="Stil4"><p>Name:</p>
<p>E-Mail:</p></td>
<td width="329" class="Stil4"><p>
<input type="text" name="name" id="name">
</p>
<p>
<input type="text" name="email" id="email">
</p></td>
</tr>
</table>
<table width="500" border="0">
<tr>
<td width="110" class="Stil4">Müsli</td>
<td width="380" class="Stil4"><select name="muesli" id="muesli">
<option value="ja">Ja</option>
<option value="nein">Nein</option>
</select>
Wie viel?
<input type="text" name="wie_viel__muesli" id="wie_viel__muesli">
kg max.75kg</td>
</tr>
<tr>
<td class="Stil4">Müsli2</td>
<td class="Stil4"><select name="muesli2" id="muesli2">
<option value="ja">Ja</option>
<option value="nein">Nein</option>
</select>
Wie viel?
<input type="text" name="wie_viel__muesli2" id="wie_viel__muesli2">
kg max.75kg</td>
</tr>
<tr>
<td class="Stil4">Hafer geschält</td>
<td class="Stil4"><select name="hafer_geschaelt" id="hafer_geschaelt">
<option value="ja">Ja</option>
<option value="nein">Nein</option>
</select>
Wie viel?
<input type="text" name="wie_viel__hafer_geschaelt" id="wie_viel__hafer_geschaelt">
kg max.75kg</td>
</tr>
<tr>
<td class="Stil4">Hafer ungeschält</td>
<td class="Stil4"><select name="hafer_ungeschaelt" id="hafer_ungeschaelt">
<option value="ja">Ja</option>
<option value="nein">Nein</option>
</select>
Wie viel?
<input type="text" name="wie_viel__hafer_ungeschaelt" id="wie_viel__hafer_ungeschaelt">
kg max.75kg</td>
</tr>
<tr>
<td class="Stil4">Haferflocken</td>
<td class="Stil4"><select name="haferflocken" id="haferflocken">
<option value="ja">Ja</option>
<option value="nein">Nein</option>
</select>
Wie viel?
<input type="text" name="wie_viel__haferflocken" id="wie_viel__haferflocken">
kg max.75kg</td>
</tr>
</table>
<p>
<input name="send" type="submit" id="send" value="Senden">
<input type="reset" name="back" id="back" value="Zurücksetzen">
</p>
</form>
<form name="form2" method="post" action="mailto:patricia.berger@wavenet.at">
</form>
<p class="Stil14"> </p>
<p class="Stil16"> </p>
<p class="Stil16"> </p>
<p class="Stil2">______________________________________________________________</p>
<p class="Stil4"><a href="regeln.html">~*+*Regeln*+*~</a></p>
</div>
</div>
<div id="Hauptframe2" style="position: absolute; left: 198px; top: 132px; width: 824px; height: 83px; overflow: auto; font-family: Verdana; font-size: 10px; color: black"><a href="Standart.html"><img src="http://luckyhorsestable.bplaced.net/button/Home.png" width="176" height="50" border="0"></a><a href="impressum.html"><img src="http://luckyhorsestable.bplaced.net/button/impressum.png" width="212" height="50" border="0"></a> <a href="http://pferdeklinikheartland.oyla11.de/cgi-bin/hpm_homepage.cgi"><img src="http://luckyhorsestable.bplaced.net/button/Tierklinik.png" width="240" height="50" border="0"></a> <img src="http://luckyhorsestable.bplaced.net/button/deckstation.png" width="165" height="50"></div>
<div id="Hauptframe3" style="position: absolute; left: 1px; top: 149px; width: 258px; height: 755px; overflow: auto; font-family: "A Charming Font", "Arial Black", "A Charming Font Expanded", "A Charming Font Italic", "Malgun Gothic"; font-size: 36px; color: black">
<p><img src="http://luckyhorsestable.bplaced.net/button/Mitglieder.png" width="200" height="75"></p>
<p><img src="http://luckyhorsestable.bplaced.net/button/Der%20Hof.png" width="200" height="75"></p>
<p><img src="http://luckyhorsestable.bplaced.net/button/Die%20Pferde.png" width="200" height="75"></p>
<p><img src="http://luckyhorsestable.bplaced.net/button/Die%20Stadt.png" width="200" height="75"></p>
<p><span class="Stil12">Futtershop</span></p>
<p class="Stil12">Zubehörshop</p>
<p class="Stil12">Sattler </p>
<p><img src="http://luckyhorsestable.bplaced.net/button/Wettbewerbe.png" width="200" height="75"></p>
<p><img src="http://luckyhorsestable.bplaced.net/button/Unterricht.png" width="200" height="75"></p>
<p> </p>
<p> </p>
</div>
<img src="http://i35.tinypic.com/de6ud4.jpg">
<p> </p>
</body>
</html>
|
|
EDIT: Hier die Seite:
http://luckyhorsestable.bplaced.net/Formulare.php
kann mir wirklich niemand helfen?
Geschrieben von Alex96 am 17.08.2008 um 21:31:
weis nich... probiere es mal in zeile 34
code: |
1:
2:
|
<p>E-Mail:</p>Da deine E-Mail rein</td>
|
|
Geschrieben von WuLana am 17.08.2008 um 21:49:
Das ist es sicher nicht das gehört zum FOrmular
Geschrieben von WuLana am 17.08.2008 um 22:37:
So habs mal mit dem TUT versucht aber es funktioniert nicht!
Geschrieben von WuLana am 17.08.2008 um 23:01:
Ich hab ja nur mal den Probe COde gemacht hier:
code: |
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Unbenanntes Dokument</title>
</head>
<body>
<form action="action_formular.php" method="POST">
<table><tr><th>Name:</th><td><input type="text" name="name"></td></tr>
<tr><th>e-Mail:</th><td><input type="text" name="email"></td></tr>
<tr><th>Betreff:</th><td><input type="text" name="betreff"></td></tr>
<tr><th>Homepage:</th><td><input type="text" name="homepage"></td></tr>
<tr><th>Nachricht:</th><td><textarea name="nachricht"></textarea></td></tr>
<tr><th><input type="submit" value="Absenden"></th><th><input type="reset" value="Zurücksetzen"></th></tr></table></form>
</body>
</html>
|
|
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:
28:
29:
30:
31:
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Unbenanntes Dokument</title>
</head>
<?php
$name = $_POST['name'];
$email = $_POST['email'];
$betreff = $_POST['betreff'];
$homepage = $_POST['homepage'];
$nachricht = $_POST['nachricht'];
if ( ($name == "") OR ($email == "") OR ($nachricht == "") )
{
echo "Du hast nicht alle Felder ausgefüllt! Gehe <a href='javascript:back()'>zurück</a> und korrigiere dies!";
}
else
{
$text = "Name: $name
E-Mail: $email
Homepage: $homepage
Nachricht: $nachricht";
mail("patricia.berger@wavenet.at",$betreff,$text,"From $name <$email>");
echo "Deine e-Mail wurde erfolgreich abgeschickt.";
}
?>
<body>
</body>
</html>
|
|
Das war übrigends mein erster PHP code
Geschrieben von WuLana am 17.08.2008 um 23:09:
Action hab ich als PHP gespeichert und als Fehler wird mir die PHP code angezeigt und eine E-Mail bekomme ich auch nciht
EDIT: AM Html coce liegts sicher nicht ich habs mal getest mit ner anderen Seite und das funktioniert einwandfrei
Geschrieben von WuLana am 18.08.2008 um 11:18:
Das Formular ist noch nicht hochgeladen
er zeigt ihn mir so an:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Unbenanntes Dokument</title>
</head>
<?php
$name = $_POST['name'];
$email = $_POST['email'];
$betreff = $_POST['betreff'];
$homepage = $_POST['homepage'];
$nachricht = $_POST['nachricht'];
if ( ($name == "") OR ($email == "") OR ($nachricht == "") )
{
echo "Du hast nicht alle Felder ausgefüllt! Gehe <a href='java script:back()'>zurück</a> und korrigiere dies!";
}
else
{
$text = "Name: $name
E-Mail: $email
Homepage: $homepage
Nachricht: $nachricht";
mail("patricia.berger@wavenet.at",$betreff,$text,"From $name <$email>");
echo "Deine e-Mail wurde erfolgreich abgeschickt.";
}
?>
<body>
</body>
</html>
Anbiete ist dann bplaced. Soll ich'svielleicht mal hochladen?
Geschrieben von WuLana am 18.08.2008 um 11:31:
Ne ab ich nicht danke! Da fällt mir ein Stein vom Herzen!
EDIT: Es funktioniert einwandfrei und die E-Mail ist auch angekommen!
Geschrieben von WuLana am 18.08.2008 um 13:31:
Danke! So und ab gehts jetzt PHP lernen!
Forensoftware: Burning Board, entwickelt von WoltLab GmbH