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:
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Unbenanntes Dokument</title>
</head>
<body>
<?php
include "../database.inc.php";
echo "<form action=$_SERVER[PHP_SELF] method=post>
<input type=hidden name=by value=Test>
<input type=hidden name=kat value=3>
Titel:<br>
<input type=text name=title><br>
Nachricht:<br>
<textarea name=post1 wrap=PHYSICAL></textarea><br>
<input type=submit name="send" value=Abschicken>
</form>";
if (isset($_POST[send])) {
$time = date(d . "." . m . "." . Y);
echo $time . "<br>";
echo $_POST[by] . "<br>";
$insertthread = "INSERT INTO `threads` ( `id` , `titel` , `katid` , `by` , `date` , `site` )
VALUES (
NULL , 'flala', '2', 'Test', '16.12.2007', 'vrh'
)
";
$threadres = mysql_query($insertthread);
$thread = mysql_fetch_assoc($threadres);
$byid = "SELECT * FROM `mitglieder` WHERE `name`='$_POST[by]'";
$byidres = mysql_query($byid);
$by = mysql_fetch_assoc($byidres);
$insertpost = "INSERT INTO `posts` VALUES ('', '$thread[id]', '$by[id]', '$_POST[post1]', '$time')";
if (mysql_query($insertpost)) {
echo "Thema erfolgreich erstellt.";
}
}
?>
</body>
</html>
|