No that's not it. It's not really that line of code, $Nesch just doesn't have a value. It's more this line of code:
printf("<option value=\"$topic\">$topic </option>");
The HTML that gets printed looks like this:
<option value="test">test </option>
Here's the code again cause the previous one was a little difficult to read:
<form method="POST" action="cn_news_php.php3">
<center><SELECT NAME="Newsch" SIZE=1>
<?
$result = mysql_query("SELECT * FROM news",$db);
$number = MYSQL_NUMROWS($result);
if ($result==0) {
print "nothing found";
}
for ($i=0; $i<$number; $i++)
{
$topic = mysql_result($result,$i,"topic");
printf("<option value=\"$topic\">$topic </option>");
}
?>
</SELECT></center>
<center><font color="#FFFFFF">Topic:</font></center>
<?
if ($action == "loadnews") {
$result = mysql_query("SELECT * FROM news WHERE topic = '$Newsch'",$db);
$topic = mysql_result($result,0,"topic");
$text = mysql_result($result,0,"text");
print("<center>hmm: $Newsch</center>");
printf("<center><input type=text name=CN_Topic size=68 value=$topic></center>");
}
?>
<center><font color="#FFFFFF">Text:</font></center>
<?
if ($action == "loadnews") {
printf("<center><textarea rows=11 name=CN_News cols=59 value=\"$text\"></textarea></center>");
}
?>
<p align="right"><input type="submit" value="Submit"></p> </form>
<form method="POST" action="admin.php3 action=loadnews">
<p align="right"><input type="submit" value="Load"></p>
</form>