Techissue2008 wrote:Are there any tutorials?
I'm sure there's some out there, just search for "php dynamic dropdown" or something, but the concept is very simple:
// execute query to get list of subjects, SELECT'ing subjectid and subject, then:
$sid = (isset($_POST['subject']) ? $_POST['subject'] : '');
while($row = mysql_fetch_assoc($query))
echo '<input type="radio" name="subject" value="' . $row['subjectid']
. '"' . ($sid == $row['subjectid'] ? 'checked="checked"' : '') . '>'
. $row['subject'] . "<br>\n";
Dropdowns are similar; output the <select> tag, then loop through the database to echo out each <option> tag, and then echo out the closing </select> tag.