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:
|
<html>
<head>
<link rel="stylesheet" type="text/css" href="style.css">
<title>Jennipics - Fotografie von Jennifer Becken</title>
<h1>Einen Eintrag ins Gästebuch machen</h1>
</head>
<body>
<?php
include('db.php');
$name = $_POST['name'];
$email = $_POST['email'];
$betreff = $_POST['betreff'];
$text = $_POST['text'];
if( ($name=='') OR ($betreff=='') OR ($text=='') ) {
echo "<h1>Achtung!</h1>Du hast nicht alle erfordelichen Felder ausgefüllt!<br><br><a href="javascript:%20history.back(-2)" target="_self">Zurück</a>";
} else {
$eintrag = "INSERT INTO `gaestebuch` ( `name` , `email` , `betreff` , `text` )
VALUES ('$name', '$email', '$betreff', '$text')";
$eintragen = mysql_query($eintrag);
if($eintragen==true) {
echo "<h1>Eintrag erfolgreich</h1>
Danke für deinen Gästebucheintrag :) Ich werde dir so schnell wie möglich antworten ;)";
} else {
echo "Fehler!";
include('eintrag_machen.htm');
}
}
?>
</body>
</html> |