Mac, I'm experiencing problems with a couple of the pages in the project. Can we still submit the project even if there are a couple of bugs that we haven't been able to iron out? Apart from anything else, I would like to know where I went wrong.
Registered: 14 years ago
Depends on what the couple of bugs are It is a difficult question - you are asking me if you are going to pass the exam before you write
If it is not too many, you may well receive a supplementary, meaning you hand in again next semester. It is no guarantee though, since it depends on what you did wrong where
Mac, this is what is worrying me: There is one part of the project that I am stuck on - the insertion of the sno and cid into the course_student table via the student_reg page. I cannot, for the life of me, figure out what function we are supposed to use to do it, even after having Googled extensively to find a possible solution, so I'm almost about to give up because the list page and the student edit page are also heavily dependent on that and I don't see the point of handing the project in if I can't get those working. I can see what needs to be done but haven't a clue how to go about doing it. Everything else is working but that is what's really getting me down right now. Any clues as to what it is that I'm missing in the textbook/home and learn/on Google? Not asking for the answer - just where to look.
Ok this may be a little late but here's how I did it anyway - might be bit of a long way to do it but it worked for me
On the student reg page - run 3 queries in this order:
(assuming you already have declared variables where you are going to store the sno and cid)
1st query - insert all the form data into the student table (sno is automatically generated here)
2nd query - find out what sno has just been generated - match the email address for example straight from the form data you just received - select sno where email = ".$_POST['email']
3rd query - you already have the cid from the form data (assuming your select values = the cid corresponding to the course table), all you now need to do is: insert into course_student table (sno, cid) VALUES (post form variables)..