Newssystem --> News in wBB

ChrisKH
Habe mir heute in mühevoller Arbeit ein Newsscript gecodet.
Nun wollte ich dass die News die ich schreibe ins Forum geschrieben werden!

Hier mal der Code der acp_newsposten2.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:
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:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:
98:
99:
100:
101:
102:
103:
104:
105:
106:
107:
108:
109:
110:
111:
112:
113:
114:
115:
116:
117:
118:
119:
120:
121:

<?php
session_start();
?>

<?php
if(!isset($_SESSION["username"]))
   {
   echo "Bitte erst <a href=\"login.html\">einloggen";
   exit;
   }
?>


<html>
<head>
<title>ACP - Hauptseite - ActionNews exclusive for beeez</title>
</head>
<body bgcolor="#36648B">
<center>
<img src="./logo.png"> <br>
<font face="verdana" size="2">
<?php

$verbindung mysql_connect("localhost",
"web291","passwort sag ich euch net");

mysql_select_db("usr_web291_1")
or die ("Die Datenbank existiert nicht.");

$id $_POST["id"] ;
$autor $_SESSION["username"] ;
$name $_POST["name"];
$content $_POST["content"] ;
$forum $_POST["forum"];
$forumja "JA";
$threadid $_POST["threadid"];
$postid $_POST["postid"];
$zeit time();






if ($forum == "JA")
 {
$eintrag3 "INSERT INTO bb1_threads
(threadid, boardid, prefix, topic, iconid, starttime, starterid, lastpostime, lastposterid, lastposter, replycount, views, closed, voted, votepoints, attachments, pollid, important, visible)
VALUES
('$threadid', '2', '0', '$name', '0', '$zeit', '2', '$zeit', '2', 'ChrisKH', '0', '0', '0', '0', '0', '0', '0', '0', '1' )";

$eintragen3 mysql_query($eintrag3);

 }


if ($forum == "JA")
 {
$eintrag1 "INSERT INTO bb1_posts
(postid, parentpostid, threadid, userid, username, iconid, posttopic, posttime, message, attachments, edittime, editorid, editor, editcount, allowsmilies, allowhtml, allowbbcode, allowimages, showsignature, ipadress, visible, reindex)
VALUES
('$postid', '0', '$threadid', '2', 'ChrisKH', '0', '$name', '$zeit', '$content', '0', '0', '0', '0', '0', '1', '1', '1', '1', '0', '***.***.**.**', '1', '0' )";

$eintragen1 mysql_query($eintrag1);
 }


if ($eintragen1 == true)
  {
echo "Der Thread wurde erfolgreich erstellt!";
  }
else
  {
echo "Der Thread wurde nicht erstellt!";
  }

if ($eintragen3 == true)
  {
echo "Der Post wurde erfolgreich erstellt!";
  }
else
  {
echo "Der Post wurde nicht erstellt!";
  }










$eintrag "INSERT INTO news
(id, autor, name, content)
VALUES
('$id', '$autor', '$name', '$content')";

$eintragen mysql_query($eintrag);


if($eintragen == true)
   {
   echo "Eintrag war erfolgreich";
   }
else
   {
   echo "Fehler beim Speichern";
  }

?><br>
<a href="./acp_index.php">Zurück ins ACP</a>


</font>
</center>
</body>
</html>


Er schreibt aber keinen Post oder Thread es kommt nur die Meldung die if($eintragen == true) ausgibt, nämlich das kein Post/Thread erstellt wurde.

Danke schonmal für die Hilfe.
ChrisKH
$_CookIe
Du musst nicht nur was in bbx_posts eintragen, sondern erstmal
einen Thread erstellen (bbx_threads) und dann die letzte ThreadID
auslesen und in DIESER muss dann dein Beitrag hin. Augenzwinkern
virus
was cih mich frage: wieso schreibst du die beiträge nicht driekt ins forum, und liest es dann von dort aus?