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 (https://www.gegen-bilderklau.net/thread.php?threadid=149717)


Geschrieben von CL.mein.Traumpferd am 02.02.2009 um 20:50:

  Formular

Hallo,

ich habe heute mal ein Anmeldeformular für meinen VRH gecodet nur leider klappt das abschicken nicht (kommt im das man nicht alle Felder ausgefüllt hat). Ich habe alles durchgesehen aber kann den Fehler nicht finden.

Formular1.html
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:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Probeanmeldung</title>
<link type=text/css rel=stylesheet href=http://pferdespass.pf.ohost.de/Lavanna/style3.css>
</head>
<body style="background:url('../Grafiken/HGhell.gif')">
<div class="head">Probeanmeldung</div><br>
<center>Schön, das du dir die Erklärung durch gelesen hast und dich anmelden möchtest<br>
<b><br><br>
<form action="action_formular1.php" method="post">
<table width="90%" class="tableinborder" border="0" cellspacing='1'>
<tr>
<td class="tablespalte" colspan="3"></td>

</tr>
<tr>
<td colspan="2" class="tabletitle">Formular</td>
</tr>
<tr>
<td class="tablea"><b>Name</b></td>
<td class="tableb"><input class="input" type=text name="name"></td>
</tr>
<tr>
<td class="tablea"><b>Schulpferd</b></td>
<td class="tableb"><input class="input" type=text name="schulpferd"></td>
</tr>
<tr>
<td class="tablea"><b>Geburtstag</b></td>

<td class="tableb"><input class="input" type=text name="geburtstag" value="TT.MM.JJJJ"></td>
</tr>
<tr>
<td class="tablea"><b>Email</b></td>
<td class="tableb"><input class="input" type=text name="email" value="@"></td>
</tr>
<tr>
<td colspan=2 class="tablecat"><input type=submit value="Senden" class="button">
</td>
<tr>
<td class="tablespalte" colspan="3"></td>
</tr>
</table>
</form>
</center>
</body>

</html>


action_formular1.php
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:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Probeanmeldung</title>
<link rel="stylesheet" href="http://pferdespass.pf.ohost.de/Lavanna/style3.css" type="text/css">
</head>
<body style="background:url('../Grafiken/Gaestebuchhg.png')">
<?php
  $name $_POST['name'];
  $schulpferd $_POST['schulpferd'];
  $geburtstag $_POST['geburtstag'];
  $email $_POST['email'];
  if ( ($name == "") OR ($email == "") OR ($schulpferd == "") OR ($gebutstag == "") )
  {
    echo "Du hast nicht alle Felder ausgefüllt! Gehe <a href='javascript:back()'>zurück</a> und korrigiere dies!";
  }
  else
  {
    $text "Name: $name
Schulpferd: $schulpferd
Geburtstag: $geburtstag
Email: $email";
    mail("Maxpferd1@web.de",$betreff,$text,"From $name <$email>");
    echo "Deine e-Mail wurde erfolgreich abgeschickt.";
  }
?>
</body>
</html>


Vieleicht könnt ihr mir weiter helfensmile
Vlg



Geschrieben von Carina am 02.02.2009 um 20:52:

 

du hast beim action formailer gebutstag geschrieben. Da fehlt das R vielleicht ist es das?



Geschrieben von CL.mein.Traumpferd am 02.02.2009 um 20:57:

 

Ich dödel xD! Jetzt klappts!
Danke!
Vlg


Forensoftware: Burning Board, entwickelt von WoltLab GmbH