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] Was ist am Formmailer Code falsch? Helft mir! (https://www.gegen-bilderklau.net/thread.php?threadid=142209)


Geschrieben von honey** am 06.10.2008 um 09:37:

  Was ist am Formmailer Code falsch? Helft mir!

Hab hier mal einen ganz einfachen Code, fehlt iwas oder hab ich was falsches eingegeben?
Zitat:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="content-type">
<title>Anmeldungsformular</title>
</head>
<body>
<form action="Anmeldungsformular.php" name="xx"
method="post">
Name: &nbsp; &nbsp; &nbsp;&nbsp; <input name="name"
size="20" type="text">
<br>
<br>
E-Mail: &nbsp; &nbsp; &nbsp; <input name="mail"
size="20" type="text">
<br>
<br>
Probepferd: <input name="pferd" size="20" type="text">
<br>
<br>
<br>
<input name="reset" value="Reset" type="submit"><input
name="send" value="Senden" type="submit"></form>
($mail != "")
mail"Gestuet-dEqui@web.de","&sect;name hat sich
eingemeldet","INHALT DER NACHRICHT","Probeanmeldung");
echo "Vielen Dank, die Hofleitung wurde informiert!";
</body>
</html>


LG



Geschrieben von honey** am 06.10.2008 um 10:33:

 

Das ist der Code vom formular.html


Zitat:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="content-type">
<title>formular</title>
</head>
<body>
<form action="action_formular.php" method="post">
<table>
<tbody>
<tr>
<th>Name:</th>
<td><input name="name" type="text"></td>
</tr>
<tr>
<th>E-mail:</th>
<td><input name="e-mail" type="text"></td>
</tr>
<tr>
<th>Pferd:</th>
<td><input name="pferd" type="text"></td>
</tr>
<tr>
<th><input value="Absenden" type="submit"></th>
<th><input value="Zur&uuml;cksetzen" type="reset"></th>
</tr>
</tbody>
</table>
</form>
<br>
</body>
</html>


Das ist von der PHP:

Zitat:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="content-type">
<title>action_formular</title>
</head>
<body>
<?php $name = $_POST['name'];
$e-mail = $_POST['e-mail'];
$pferd = $_POST['pferd'];
if ( ($name == "") OR ($email == "") OR ($pferd == "") )
{
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
Pferd: $pferd";
}
mail("Gestuet-dEqui@web.de",$betreff,$text,"From $name <$email>");
echo "Deine e-Mail wurde erfolgreich abgeschickt.";
}
?>
<br>
</body>
</html>




Ich weiß aber jetzt nich wie ich das zusammen hochladen kann...
also mit ftp und so, bin iwie zu blond



Geschrieben von honey** am 06.10.2008 um 10:50:

 

ja, das hab ich ja...
aber wenn ich das formular absenden will, kommt immer:
Die seite ist nich verfügbar und auch wenn ich nicht alles ausgefüllt hab:
Diese Seite ist nicht verfügbar,,,



Geschrieben von honey** am 06.10.2008 um 15:42:

 

huch, da stand ncoh en .html hinter, aber wenn ich jetz auf senden klick kommt das:
Parse error: syntax error, unexpected '=' in /usr/export/www/hosting/dequi/action_formular.php on line 13



Geschrieben von honey** am 08.10.2008 um 09:39:

 

bitte helft mir....



Geschrieben von Melli am 08.10.2008 um 11:41:

 

Bei welchem Hoster bist du denn?
Und heißt es auch action_formular.php?
Versuchs mal so. Bin mir aber nicht ganz sicher :>
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:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="content-type">
<title>action_formular</title>
</head>
<body>
<?php $name $_POST['name'];
$e-mail $_POST['e-mail'];
$pferd $_POST['pferd'];
if ( ($name == "") OR ($e-mail == "") OR ($pferd == "") )
{
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: $e-mail
Pferd: $pferd";
}
mail("Gestuet-dEqui@web.de",$betreff,$text,"From $name <$e-mail>");
echo "Deine e-Mail wurde erfolgreich abgeschickt.";
}
?>
<br>
</body>
</html>



Geschrieben von Rocky am 08.10.2008 um 12:04:

 

Bei $e-mail den Bidestrich weg. Und dann nochmal probieren Augenzwinkern



Geschrieben von honey** am 08.10.2008 um 17:37:

 

So, hab jetz so lange getrickst bis es klappt...
Vielen Dank an alle *KEKSE*


Forensoftware: Burning Board, entwickelt von WoltLab GmbH