i want some assistance on the usage of the switch case function. i have a form that allows the uses to select multiple courses, once these courses are selected and submit is pressed i want the courses to be validated via the information in the database
eg
1. controls and instrumentation 1 (pre requisite = control systems )
2. communication systems 2 (pre requisite =communications systems 1)
3. industrial and commercial systems (pre requisite = emech)
4. data communications (pre requisite = none )
5. intro to accounting systems (pre requisite )
6. production management (pre requisite =none)
So when the student chooses these courses and clicks validate the system must determine the first course and then check if there is a prerequisite course , if yes then check the status of the prerequisite. Then repeat this procedure for the next course until all the courses are accounted for.
Once the prerequisite rule is finished then the system check the semester load, since in this case all the select courses have a combined credit total of 20 which is over the max number of credits that a student can attempt in one semester (this maximum number is currently set to 18) so the student is in breach of this rule. Once this is done the system must present the relevant flags and error messages to the student of both rules (the prerequisite rule and the semester load).
my problem is that. I don’t know what the code looks for when checking each case. meaning that I don’t know if I can just put the name of the php file that contain the code for the various rule or I have to create an function with the same code as what is contained in the php file
note the rules that i am reffering to (prerequisite and semester load )are saved as php files
however any other ways of achieving this will be welcomed