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] Formular geht nicht... (https://www.gegen-bilderklau.net/thread.php?threadid=159698)
Geschrieben von Amaita am 30.07.2009 um 17:07:
Formular geht nicht...
Hay (:
Jemand hatte mir mal für mein Gut ein Formular gecodet. Nun wollte ich dieses auch für eine andere Seite nutzen und hab's mal umgeschrieben... leider geht's jetzt nicht... kann mir da jemand helfen!?
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:
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Wallenberg</title>
</head>
<body>
<span style="font-weight: bold; font-family: Tahoma;">Formular<br>
</span>
<center>
<form action="action_formular.php" method="post">
<table>
<tbody>
<tr style="font-weight: bold;">
<td><small><small><big style="font-family: Tahoma;">Name</big></small></small></td>
</tr>
<tr style="font-weight: bold;">
<td><small><small><input name="name" type="text"></small></small></td>
</tr>
<tr style="font-weight: bold;">
<td><small><small><big style="font-family: Tahoma;">Email-Adresse</big></small></small></td>
</tr>
<tr style="font-weight: bold;">
<td><small><small><input name="email" type="text"></small></small></td>
</tr>
<tr style="font-weight: bold;">
<td><small><small><big style="font-family: Tahoma;">Hofadresse</big></small></small></td>
</tr>
<tr style="font-weight: bold;">
<td><small><small><input name="adresse" type="text"></small></small></td>
</tr>
<tr style="font-weight: bold;">
<td><small><small><big style="font-family: Tahoma;">Hengst</big></small></small></td>
</tr>
<tr style="font-weight: bold;">
<td><small><small><input name="hengst" type="text"></small></small></td>
</tr>
<tr style="font-weight: bold;">
<td><small><small><big style="font-family: Tahoma;">Stute</big></small></small></td>
</tr>
<tr style="font-weight: bold;">
<td><small><small><input name="stute" type="text"></small></small></td>
</tr>
<tr style="font-weight: bold;">
<td><small><small><big style="font-family: Tahoma;">Link zum Pony</big></small></small></td>
</tr>
<tr style="font-weight: bold;">
<td><small><small><input name="pony" type="text"></small></small></td>
</tr>
<tr style="font-weight: bold;">
<td><small><small><big style="font-family: Tahoma;">Sonstiges</big></small></small></td>
</tr>
<tr style="font-weight: bold;">
<td><small><small><input name="sonstiges" type="text"></small></small></td>
</tr>
<tr>
<td><input value="Absenden" type="submit"><input value="Zurücksetzen" type="reset"></td>
</tr>
</tbody>
</table>
</form>
</center>
</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:
|
<?php
$name = $_POST['name'];
$betreff = "Deckformular W";
$email = $_POST['email'];
$adresse = $_POST['adresse'];
$hengst = $_POST['hengst'];
$stute = $_POST['stute'];
$pony = $_POST['pony'];
$sonstiges = $_POST['sonstiges'];
if ( ($name == "") OR ($email == "") OR ($adresse == "") )
{
echo "Bitte fülle alle Felder aus. <a href='javascript:back()'>Zurück</a> und vervollständigen!";
}
else
{
$text = "Das Formular wurde abgeschickt!
$name ($email) möchte gerne $stute von $hengst decken lassen. Sie kommt von $adresse und der Link zum Pony ist $pony. $sonstiges;"
mail("schmit_christine@yahoo.de",$betreff,$text,"From $name <$email>");
echo "Das Formular wurde erfolgreich abgeschickt.";
}
?> |
|
Hoffentlich kann mir da wer helfen :/
Amaita
Geschrieben von Black Katrin am 30.07.2009 um 18:16:
fehlermeldung? funpic oder kilu? ist die mail() funktion überhaupt frei geschalten?
Geschrieben von Amaita am 30.07.2009 um 18:44:
ohost
wie mail() funktion!?
Geschrieben von Black Katrin am 30.07.2009 um 18:59:
wenn es keien fehlermeldung hat, der code stimmt und trotzdem nicht geht ist auf dem server sehr warscheinlich die mail() funktion deaktiviert.
schau bei ohost nach ob sie dies überhaupt erlauben, resp. fragn den support von ihnen
Geschrieben von Amaita am 30.07.2009 um 21:08:
hmm :/ vllt hab ich auch einen Fehler in dem PHP-Teil gemacht... kenn mich da ja nicht aus!?
Geschrieben von Nanni am 30.07.2009 um 21:12:
Zeile 19: $name ($email) möchte gerne $stute von $hengst decken lassen. Sie kommt von $adresse und der Link zum Pony ist $pony. $sonstiges
Du definierst gerade $text - dir fehlt also das ", um Text wieder zu schließen, und ein ; am Ende der Zeile. Also:
$name ($email) möchte gerne $stute von $hengst decken lassen. Sie kommt von $adresse und der Link zum Pony ist $pony. $sonstiges;"
Geschrieben von Amaita am 30.07.2009 um 21:17:
hab's mal ausgebessert, aber geht noch immer nicht...
Geschrieben von Nanni am 30.07.2009 um 21:26:
Oh. Du hast das ziemlich verwirrend... wenn da steht Hofadresse und der Name des input-Feldes ist pferd.
<input name="status" ...> kommt bei dir auch ziemlich oft vor. Da schaust du am besten noch mal drüber - bei <input .... name="blubb">
muss es dann im php-Teil heißen: $blubb = $_POST['blubb'];
Ich hoff das war jetzt halbwegs verständlich (:
Geschrieben von Amaita am 30.07.2009 um 21:33:
wie doof... hab mal alles umgeändert... geht trotzdem nicht :/
ich editier mal oben den Code rein^^ hab da ja jetzt schon einiges verbessert...
Geschrieben von Nanni am 30.07.2009 um 21:37:
Zeile 19: "; nicht umgekehrt. Du beendest erst die Definition von $text, und die steht zwischen "". Danach kommt das ; , damit es weitergeht.
Uh, wenns jetzt wieder nicht geht, gehen mir langsam die Ideen aus
Geschrieben von Amaita am 30.07.2009 um 21:53:
ich hab jetzt mal das "; umgeändert... damit ich das richtig verstehe, frag ich erstmal
das heißst vor die Zeile 19 muss noch ein " und zum schluss der Zeile noch ein , ?
-> Nachricht wurde abgeschickt
ich schau mal ob sie angekommen ist x)
Geschrieben von .chilli am 10.08.2009 um 22:41:
Weder bei funpic noch bei ohost funktioniert derzeit die mail()-Funktion. Ohost hat angekündigt sich drum zu kümmern, von funpic kam noch nichts (siehe funpic bzw. ohost-Foren)
Forensoftware: Burning Board, entwickelt von WoltLab GmbH