evlive Posted July 9, 2008 Share Posted July 9, 2008 This is probably a fairly simple question to most, but I'm a beginner so it's got me confused! I'm populating a the option for a select tag by simply preforming a mysql query and getting all the unique values. Now that's not an issue but what I want to do is by selection one of those options, pull two of the options due to a name change. Is this possible? Link to comment https://forums.phpfreaks.com/topic/113916-selecting-multiple-values/ Share on other sites More sharing options...
rajivgonsalves Posted July 9, 2008 Share Posted July 9, 2008 do you want to select multiple options please elaborate on your question its not very clear. some code would be helpful Link to comment https://forums.phpfreaks.com/topic/113916-selecting-multiple-values/#findComment-585364 Share on other sites More sharing options...
evlive Posted July 9, 2008 Author Share Posted July 9, 2008 Sure....OK... <select name="subject"> <option value="">All Subjects</option>'; while ($subject_row = mysql_fetch_array($subject_result)) { echo " <option value=\"" . $subject_row[0] . "\">" . $subject_row[0] . "</option>\n"; } This populates the select tag....Then... $subject = urldecode(@$_GET['subject']); I believe this get's what the user selects when they hit the submit button. To general? I didn't write the app and it's not very well documented. So it makes it just that much harder. -Thanks! Link to comment https://forums.phpfreaks.com/topic/113916-selecting-multiple-values/#findComment-585385 Share on other sites More sharing options...
trq Posted July 9, 2008 Share Posted July 9, 2008 To general? I didn't write the app and it's not very well documented. So it makes it just that much harder. No, its your question that is unclear. What exactly do you want to do? Link to comment https://forums.phpfreaks.com/topic/113916-selecting-multiple-values/#findComment-585388 Share on other sites More sharing options...
evlive Posted July 9, 2008 Author Share Posted July 9, 2008 It for a class schedule. And one of the classes name was changed. So instead of removing it and leaving users in the dark, I want to keep that option available but when you select it, I want it to point to the old name and the new name. Link to comment https://forums.phpfreaks.com/topic/113916-selecting-multiple-values/#findComment-585404 Share on other sites More sharing options...
alco19357 Posted July 9, 2008 Share Posted July 9, 2008 That's why you're updating your MySQL database, that's the convenience! Link to comment https://forums.phpfreaks.com/topic/113916-selecting-multiple-values/#findComment-585513 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.