Hi there,
I have 3 tables:
Student (studentNum,firstName,lastName,CourseName),
course (courseID,courseTotalCapacity),
course_allocation (studentNum,courseID).
I have 3 courses, MATHS=101,BIOLOGY=102,CHEMISTRY=103.
My form has the following:
<SELECT NAME="CourseName">
<OPTION VALUE="MATHS">MATHS</OPTION>
<OPTION VALUE="BIOLOGY">BIOLOGY</OPTION>
<OPTION VALUE="CHEMISTRY">CHEMISTRY</OPTION>
</SELECT></td></tr>
<SELECT NAME="courseID">
<OPTION VALUE="101">MATHS=101</OPTION>
<OPTION VALUE="102">BIOLOGY=102</OPTION>
<OPTION VALUE="103">CHEMISTRY=103</OPTION>
</SELECT>
I would like to have some kind of a if statement, that if the user chooses the CourseName MATHS, then the courseID 101 is entered to the course and course_allocation tables and MATHS entered to the CourseName table.
As it is the user has to choose MATHS and choose MATHS=101, then click submit.
Any help, please.