Playing with Listbox

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
ashrafzia
Forum Commoner
Posts: 37
Joined: Wed Sep 28, 2005 12:23 pm

Playing with Listbox

Post by ashrafzia »

I have got all my programe_names from my table inside a list box.
Now i want whenever a progame_name is selected, the no of semesters for a programe which we are also retrieving from the table, let us say for the programe BBA the no of semesters are 8 which is stored inside a table. I want to show all the semester no's from 1,2,3.....8 inside the semester list box.
How can i put this logic???
and remember whenever a different programe_name is selected, the no of semesters stored for it in the table should be retrieved and then a loop will be started from 1....upto that No which is retrieved and then those values will be printed inside the listbox.

I want to apply all this logic on runtime. Any idea!

THanx in Advance.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

A for loop would probably do what you wish.

http://php.net/for
Post Reply