HI,
I have a little problem passing the value of the drop down list from the first form to the second. I am able to display the data in the list box, then used $_POST to get the passing data in the the second form. However when I echo the $_POST data. It's empty.
Here is the code from the 1st from (firstform.php)
$strQuery = @mysql_query("SELECT DISTINCT test_id, test_name FROM questions");
if (!$strQuery){
exit('<p> Error retrieving data from questions table: '. mysql_error(). '</p>');}
echo "<p><select name=quiz value=''>Chose a test</option></p>";
while($nt=mysql_fetch_array($strQuery)){
echo "<option value=$nt[test_id]>$nt[test_name]</option>";}
<form action="secondform.php" method="post">
<p><input type="submit" value="SUBMIT" /></p>
In the second.php :
$test_id=$_POST['quiz'];
when I echo $test. It's empty. What's wrong? I need the value $nt[test_id] for my next query in secondform.php.
Thank you.