Hey guys I have been checking the forum for a way to populate a second select field depending on the choice made from the first one. Basically i am working on projects and the delays that occur. The first select is project and i am asking user to select it by using
then for my second select statement i want it to be populated by using
I have seen a forum that says to use AJAX (http://bytes.com/forum/thread790663.html) but i dont have enough time to learn this. Is it possible to call the result found from the first select as a variable so i can then use it in the second query? where (the problem) = var1?
Any1 any ideas on this?
Code:
<?php $sql = "SELECT ProjectName FROM ProjectDetails"; "ORDER BY ProjectName"; $rs = mysql_query($sql); while($row = mysql_fetch_array($rs)) { echo "<option value=\"".$row['ProjectName']."\">"; } ?>
Code:
<?php $sql = "SELECT Task FROM Delay WHERE ProjectName = (the problem) ". "ORDER BY Task"; $rs = mysql_query($sql); while($row = mysql_fetch_array($rs)) { echo "<option value=\"".$row['Task']."\">"; } ?>
Any1 any ideas on this?
Comment