Add a pupil, then add another one.

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
benmajor
Forum Newbie
Posts: 1
Joined: Tue Apr 17, 2007 4:28 am

Add a pupil, then add another one.

Post by benmajor »

Hello all,

I hope that someone will be able to help with my request, I have been reading through all of my PHP books and searching on the internet for the answer but to no avail.

What I am looking for is a script that will add a pupil to a class, and then display a drop down box that will allow them to add another one. So for example At first, the table would look like this:

Class Add:

Class Name: Input for Class here.
Teacher: Input for Teacher here.
Pupil Add: Drop down box shoing all pupils. | Button to add this pupil |

|Submit Button.|

Once a pupil has been added using the above form, the table should look like this:

Class Add:

Class Name: Input for Class here.
Teacher: Input for Teacher here.
Pupil #: Pupil Name Here.
Pupil Add: Drop down box shoing all pupils. | Button to add this pupil |

|Submit Button.|

The table should continue like this, until the user clicks the Submit Button.

I did wonder whether this would be possible using some kind of array, but I'm not sure. The ultimate result is that I have the ID of each pupil stored as a string such as "1, 3, 12, 54" etc., which can be stored in a VARCHAR field in the MySQL Database.

I hope that I have been clear enough in my request, and I sincerely hope that someone can help with my query,
Many thanks in advance,
Ben
Post Reply