Forum Moderators: coopster
<FORM name="faqform" method="post" action="<? echo $_SERVER['PHP_SELF'];?>">
Choose a question:<br />
<select name="question"><?
$db = mysql_connect ("localhost","dbuser","dbpass");
$link = mysql_select_db ("dbname", $db);
$query = "select * from question";
$result = mysql_query($query);
while ($record = mysql_fetch_assoc($result)){
echo "<option value = '".$record["qid"]."'>".$record["qustion"];
}
?>
</select>
</FORM>
And yes there is data in the question table. There is a column called qid and question for a total of 2 columns and only 1 row as of right now.
I have a question however, I found this tutorial online and kinda fixed it up to work with what I was needing, however...I have been unable to find a tutorial on how to display the result of that question ( in the drop down menu ) into a "no editable" text box. Has anyone had any expirience with this or know of a place I might find this info I'm looking for?
Thanks again... (thumbsup)