Formularproblem |
Juicey
Mitglied
 

Dabei seit: 13.09.2008
Beiträge: 1.170
Herkunft: Deutschland
 |
|
Ich habe ein totales Formularproblem. Immer wenn ich alles ausfülle und auf abschicken gehe,steht da,dass da irgendwas fehlt,kann mir wer helfen?
Link: http://tssilberpfeil.ts.funpic.de/nennformular.html
HTML TEIL
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:
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>SEITENTITEL</title>
<!--
link zu einer externen CSS-Datei, in die Datei eingebundene CSS-Eigenschaften, etc.
-->
</head>
<body>
<!--
Evtl einleitender Text zum Formular
-->
<form action="action_nennformular.php" method="post"><small><small><span
style="font-weight: bold; text-decoration: underline; font-family: Verdana;">Nennformular</span></small></small>
<br>
<div style="text-align: left;">
<div style="text-align: left;"><small><small><span
style="font-family: Verdana;"></span><span
style="text-decoration: underline; font-family: Verdana;"></span></small></small><br>
<small><small><span style="font-family: Verdana;">Alle
Informationen bis auf die * werden gebraucht!:</span></small></small><br>
<small><small><span style="font-family: Verdana;"></span></small></small><br>
<small><small><span style="font-family: Verdana;"></span></small></small><small
style="font-weight: bold;"><small><span
style="font-family: Verdana;">Name:</span></small></small>
<input name="textfeld"
value="" type="text"> <small
style="font-weight: bold;"><small><span
style="font-family: Verdana;"></span></small></small><br>
<small style="font-weight: bold;"><small><span
style="font-family: Verdana;">Hofadresse:</span></small></small><input
name="textfeld" value="http://" type="text"><br>
<small style="font-weight: bold;"><small><span
style="font-family: Verdana;">Turnier:
</span></small></small>
<select size="1" name="Turnier">
<option>Eröffnungsturnier</option>
<option>Test</option>
<option>Test</option>
<option>Test</option>
</select>
<small style="font-weight: bold;"><small><span
style="font-family: Verdana;"></span></small></small><br>
<small style="font-weight: bold;"><small><span
style="font-family: Verdana;">Disziplin1:
</span></small></small>
<select size="1" name="Disziplin">
<option>Springen E</option>
<option>Springen A</option>
<option>Springen L</option>
<option>Springen M</option>
</select>
<br>
<small style="font-family: Verdana; font-weight: bold;"><small>Disziplin2</small></small><span
style="font-weight: bold;">* </span>
<select size="1" name="Disziplin">
<option>Springen E</option>
<option>Springen A</option>
<option>Springen L</option>
<option>Springen M</option>
</select>
<br>
<small style="font-family: Verdana; font-weight: bold;"><small>Disziplin3*:</small></small>
<select size="1" name="Disziplin">
<option>Springen E</option>
<option>Springen A</option>
<option>Springen L</option>
<option>Springen M</option>
</select>
<br>
<small style="font-weight: bold;"><small><span
style="font-family: Verdana;">Pferdlink1:</span></small></small> <small
style="font-weight: bold;"><small><span
style="font-family: Verdana;"> <input name="textfeld"
value="http://" type="text"></span></small></small><br>
<small style="font-weight: bold;"><small><span
style="font-family: Verdana;"></span></small></small><br>
<small style="font-weight: bold;"><small><span
style="font-family: Verdana;"></span></small></small></div>
<small style="font-weight: bold;"><small><span
style="font-family: Verdana;"></span></small></small></div>
<input value="Abschicken" type="submit"><input
value="Zurücksetzen" type="reset"></form>
</body>
</html> |
|
PHP TEIL
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:
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>nennformular</title>
<!--
link zu einer externen CSS-Datei, in die Datei eingebundene CSS-Eigenschaften, etc.
-->
</head>
<body>
<?php
// Mit diesen Codes "holt" man sich jetzt die Angaben, die im Formular gemacht wurden:
$name = ($_POST['name']);
$hofadresse = ($_POST['hofadresse']);
$turnier = ($_POST['turnier']);
$disziplin1= ($_POST['disziplin1']);
$disziplin2= ($_POST['disziplin2']);
$disziplin3= ($_POST['disziplin3']);
$pferdelink1= ($_POST['pferdelink1']);
// Um zu überprüfen, ob auch wirklich alle Angaben gemacht wurden, folgt jetzt eine if-Abfrage:
if ( ($name == "") OR ($hofadresse == "") OR ($turnier == "") OR ($disziplin1 == "") OR ($disziplin2 == "") OR ($disziplin3 == "") OR ($pferdelink1 == "") )
{
echo "Irgendwas fehlt,am Besten du startest das Formular neu!";
}
// Das heißt: wenn (if) eine der Angaben nicht gemacht werden, erscheint der Text vom echo()-Befehl. Ansonsten (else) wird die e-Mail verschickt:
else
{
mail("ts_silberpfeil@yahoo.de",$betreff,$nachricht,"From: $name <$email>");
echo "Deine E-Mail wurde erfolgreich verschickt.";
}
?>
</body>
</html> |
|
Über eine Hilfe wäre ich wirklich sehr sehr dankbar !
__________________ no one sleeps when i'm awake.
|
|
14.05.2009 15:23 |
|
|
Leila

Mitglied
 
Dabei seit: 09.02.2005
Beiträge: 12.987
 |
|
Im HTML-Code jeweils in Z. 47, Z. 56 und Z. 64 bei name="Disziplin" das "Disziplin" durch "disziplin1" "disziplin2" bzw. "disziplin3" ersetzen
Ebenso bei allen anderen feldern, das im HTML-Code in den "" hinter name= steht, muss auch im PHP Code beim folgenden fettgedruckten stehen
$name = ($_POST['name']);
keine Ausnahmen, keinerlei Unterschiede in Groß- und Kleinschreibung
|
|
14.05.2009 19:30 |
|
|
cll

Hafifan in Action ->www.hafifieber.com
 

Dabei seit: 12.02.2005
Beiträge: 1.887
Herkunft: Bayern
 |
|
du hättest einfach nur in deiner Antwort sagen müssen, was er dir jetzt anzeigt! Dazu ist der Test ja! Dann kannst du schlussfolgern was falsch ist!
__________________
|
|
15.05.2009 09:24 |
|
|
Juicey
Mitglied
 

Dabei seit: 13.09.2008
Beiträge: 1.170
Herkunft: Deutschland
Themenstarter
 |
|
Okay danke für die Hilfe,aber ich habe nun ein neues Problem,zwar sendet der das an unsere Mail,aber es steht nichts drinnen!
__________________ no one sleeps when i'm awake.
|
|
15.05.2009 16:42 |
|
|
cll

Hafifan in Action ->www.hafifieber.com
 

Dabei seit: 12.02.2005
Beiträge: 1.887
Herkunft: Bayern
 |
|
wie denn auch? Dein inhalt ist $nachricht, und die Variable hast du nicht erzeugt
__________________
|
|
16.05.2009 11:51 |
|
|
Juicey
Mitglied
 

Dabei seit: 13.09.2008
Beiträge: 1.170
Herkunft: Deutschland
Themenstarter
 |
|
Oh danke,dass werde ich dann direkt ändern
Mensch bin ich verpeilt <3
__________________ no one sleeps when i'm awake.
|
|
16.05.2009 12:25 |
|
|
|
Impressum
|