Parse error: parse error, unexpected T_VARIABLE in ....newthread_script.php on line 4
weiß jemand warum??
so sieht das formular aus:
<body>
<form action="newthread_script.php" method="POST">
<input type="hidden" name="fid" value="<?php $fid ?>" border="0"> Titel des Beitrages: <input type="text" name="topic" size="50"><br>
Name des Autors: <input type="text" name="name" size="50"><br>
Nachricht: <textarea name="nachricht" rows="10" cols="55"></textarea><br>
<input type="submit">
</form>
</body>
hier die newthread_script.php datei
<?
include("dbconnect.php");
//Variablen auf andere Deklarieren (ist einfacher zu schreiben)
$nachricht = $HTTP_POST_VARS ["nachricht"];
$topic = $HTTP_POST_VARS ["topic"];
$name = $HTTP_POST_VARS ["name"];
$fid = $HTTP_POST_VARS ["fid"];
//schreiben in DB (nur Thread an sich)
mysql_query ("insert into threads set fid='$fid', topic='$topic', created=now()" );
//nun brauchen wir noch die neue ID des Threads, um sie in answers
// einzutragen
$res = mysql_query ("select max(id) AS max from threads" );
$row = mysql_fetch_array ($res );
$thread_id = $row ["max" ];
//so nun schreiben wir den eigentlichen Beitrag in die DB
mysql_query ("insert into answers set text='$text', topic='$topic', user='$name', fid='$fid', tid='$thread_id', created=now()" );
//Weiterleitung zu der Auflistung der Threads im
//bereits ausgewählten Forum
header ("Location: showthreads.php?fid=" .$fid );
?>
thx
Benny