amirkhansemail
Programmer
What should I write instead of the question marks in the first line to call news.php with the value n.news_id in the SQL Select statement
Your help is highly appreciated. Thanks in advance.
Amir
Code:
<form method="POST" name="news_selected_form" action="news.php?newsid=[b][u]?????????[/u][/b]">
<select name="sel_news_id" onchange="news_selected_form.submit();">
<?php
$query="select n.news_id, n.title from news n";
$result = @mysql_query($query);
while ($row = mysql_fetch_array ($result, MYSQL_ASSOC))
$news_pulldown .= "<option value=\"{$row['news_id']}\">{$row['title']}</option>\n";
echo $news_pulldown;
?>
</select>
</form>
Your help is highly appreciated. Thanks in advance.
Amir