Welcome! Log In Create A New Profile

Advanced

Portfolio Help

Posted by Riaz 
Announcements Last Post
Announcement : Programming Students at UNISA School of Computing 06/19/2019 02:01PM
Announcement SoC Curricula 09/30/2017 01:08PM
Announcement Demarcation or scoping of examinations and assessment 02/13/2017 07:59AM
Announcement School of Computing Short Learning Programmes 11/24/2014 08:37AM
Announcement Unisa contact information 07/28/2011 01:28PM
avatar Portfolio Help
September 28, 2011 02:36PM
Thought I should create a new topic so that everyone who need's help with their portfolio can post questions smiling smiley

student no: 77315138
avatar Re: Portfolio Help
September 29, 2011 05:52PM
When is the portfolio due for? Thank you smiling smiley.
avatar Re: Portfolio Help
September 29, 2011 05:52PM
Hey Riaz

Yesterday i was typing out a question and in doing so the answer popped into my head, go figure
But I do have a general question that can be used in the portfolio thou
It being...

The text book tought us how to SELECT something WHERE something = something....
All matches are mysql_fetch_arrray and a while loop is used to generate a html table with the selected info you wish to show
Now I was wondering is it possible to do this with selections from multiply tables...
For instance , how would one generate a table for the student_man that displays all the students info from the student table and the course he is registered from the course_student table....
info from two different table
Ive been trying this here and there but I cannot figure out or google how this is done.... looping through two mysql_fetch_arrrays ???

I did come across joining tables somewhere which i haven't played with yet, perhaps this is how it is done?
avatar Re: Portfolio Help
September 29, 2011 05:56PM
G.D.C Wrote:
-------------------------------------------------------
> This question has probably been answered else
> where but when is the portfolio due for? Thanks.

Sticky here

28 oct!
avatar Re: Portfolio Help
September 29, 2011 05:59PM
Awe, thanks Riaz.
avatar Re: Portfolio Help
September 30, 2011 06:47AM
Hi PeterJ,

PeterJ Wrote:
-------------------------------------------------------
> Hey Riaz
>
> Yesterday i was typing out a question and in doing
> so the answer popped into my head, go figure
> But I do have a general question that can be used
> in the portfolio thou
> It being...
>
> The text book tought us how to SELECT something
> WHERE something = something....
> All matches are mysql_fetch_arrray and a while
> loop is used to generate a html table with the
> selected info you wish to show
> Now I was wondering is it possible to do this with
> selections from multiply tables...
> For instance , how would one generate a table for
> the student_man that displays all the students
> info from the student table and the course he is
> registered from the course_student table....
> info from two different table
> Ive been trying this here and there but I cannot
> figure out or google how this is done.... looping
> through two mysql_fetch_arrrays ???
>
> I did come across joining tables somewhere which i
> haven't played with yet, perhaps this is how it is
> done?

To join tables you will have to use sql INNER JOIN....

This is how I do it:

Language: SQL
SELECT `course_student`.`sno`, `course_student`.`cid`, `student`.`fname`, `student`.`sname`, `course`.`cname` FROM `student` INNER JOIN `course_student` ON `course_student`.`sno` = `student`.`sno` INNER JOIN `course` ON `course`.`cid` = `course_student`.`cid` WHERE `student`.`sno` = '1'

This should output the SNO, CID, FNAME, SNAME, CNAME smile

student no: 77315138
avatar Re: Portfolio Help
October 05, 2011 09:26PM
Tx Riazthumbs up

hehe i was on the right path with the sql join
avatar Web Registration Project Uploaded
October 11, 2011 09:06AM
I've uploaded my Web-Based Student Registration Application to http://dragonrider2.ueuo.com. I named it Space Academy

Will Mac and the students be able to test it out and provide feedback for me if its not too much trouble to ask?

Add a course, add students to the course, try the dates like 30 Feb, 31 Sep, leave some fields blank and see what happens. Try clicking the 'Register' button or Reload the page immediatly after you have registered a student.

I'm just wondering whether I've passed and got my 50%?
avatar
Mac
Re: Portfolio Help
October 11, 2011 10:26AM
Not me.... this is like an exam and I cannot "mark" it before submission smiling smiley
Re: Portfolio Help
October 11, 2011 01:10PM
To Ash

I think your project is looking great, everything seems to be working.
Although once I added a student, it appeared on the 'manage students' page, but not in order (although I don't think this is critical) , student 12 appeared on the list before student 11.
You could just add in 'ORDER BY sno' if you havent already.
The dates and everything else seemed to be working perfectly!
avatar Web Registration Project Uploaded
October 11, 2011 02:55PM
Thanks Michela, I've added the 'ORDER BY sno'. Interesting I like it.

So when are all the other students going to upload their web app projects, I'm dying to see your wonderful designs and ideas. Maybe some pictures.
avatar Re: Portfolio Help
October 11, 2011 03:02PM
Hi Ash,

It looks good smile good job !

I noticed that you didn't have a login for the administrator part, all the links for administration are presented soon as you go on the website. Are you going to add the Register for a course link for the student registration ?

Everything else is working thumbs up

student no: 77315138
avatar Re: Portfolio Help
October 11, 2011 03:25PM
Hi Riaz,

Is administrator authentication required or is it just considered bonus functionality? I was under the impression that the system is to be developed solely for administrators and so having to log in seems pointless because no additional functionality is added. However, I do like the idea of having only the Register Student component of the system available initially so that it can be used by students, and then adding the additional functionality once someone is logged in as an administrator. Is this what you have done?
avatar Portfolio Help
October 11, 2011 10:04PM
Thanks Riaz, I don't need to add the 'Register for a course link'. You can just select the course you want to do on the Student Registration page (student_reg.php).

And if the course does not exist you can create it in the Manage Courses page (course_man.php) then when you go back to the Student Registration page, the course will appear in the pop down menu ready to be selected smile.

------------------------ ------------------------ ------------------------


About the login for the administrator part, that requires $_SESSIONS to be attached to the beginning of each page. Thanks for reminding me, I might have left it out.

I'll think about this part. Back to the Tutorial to refresh my memory on Walkthrough One - PHP User Authentication.

So my index page should have no links and should have a username and password textboxes. If its correct then it should regenerate the page to how you see it now?
avatar Re: Portfolio Help
October 12, 2011 07:33AM
G.D.C Wrote:
-------------------------------------------------------
> Hi Riaz,
>
> Is administrator authentication required or is it
> just considered bonus functionality? I was under
> the impression that the system is to be developed
> solely for administrators and so having to log in
> seems pointless because no additional
> functionality is added. However, I do like the
> idea of having only the Register Student component
> of the system available initially so that it can
> be used by students, and then adding the
> additional functionality once someone is logged in
> as an administrator. Is this what you have done?


Hi G.D.C,

Yes I added a login box where the administrator can log in, in the tutorial letter it states:

Quote

Four main pages (with associated forms) are required (you must use the suggested page
names):
1. a student registration form page (student_reg.php),
2. a page linking to forms required to manage courses (course_man.php),
3. a page linking to forms required to manage students (student_man.php,
4. a page that generates a listing of the students registered for a specific course (list.php).
The starting page is index.php. On this page (and on all other pages) I am presented with a
menu with the following links:

| Register a student | Manage courses | Manage students | View registrations |

Clicking on a link takes the user to the associated page and its form. Note the student
registration page is the very same page a student will see when he/she registers for a course –
the link will just be named ?Register for a course?.

So we would also have to have a link Register for a course for the student registration.

The requirements was given to us we just have to think of how to put it all together, the login box is the correct way I would separate the student and administration sections. smiling smiley

student no: 77315138
avatar Re: Portfolio Help
October 12, 2011 07:59AM
Hi Ash,

When you first come to my portfolio site it only shows the, Register for a course for the student registration.

Then at the top I have a login part where the administrator can login.

Once the administrator clicks on Login with correct credentials I reload the page only showing the links for administration so I remove the link Register for a course and only show the links that are currently shown on your portfolio.

Hope this makes sense smiling smiley

student no: 77315138
Re: Portfolio Help
October 12, 2011 01:24PM
@ Ash ............nice one, ok so you realize you left some stuff out but well done thumbs up
avatar Re: Portfolio Help
October 20, 2011 07:38PM
Language: SQL
SELECT `course_student`.`sno`, `course_student`.`cid`, `student`.`fname`, `student`.`sname`, `course`.`cname` FROM `student` INNER JOIN `course_student` ON `course_student`.`sno` = `student`.`sno` INNER JOIN `course` ON `course`.`cid` = `course_student`.`cid` WHERE `student`.`sno` = '1'

Riaz this helped me loads, ty again
What i dont understand is why there is a FROM 'student' when data was selected from all three tables

otherwise the two INNER JOIN 's really helped me figure some stuff out smileys with beer
avatar Re: Portfolio Help
October 21, 2011 11:17AM
@PeterJ

No problem thumbs up always willing to help out where I can.....

Quote

What i dont understand is why there is a FROM 'student' when data was selected from all three tables

I don't think you really need to specify the table names for the other 2 tables,
the "student" table just links to the other 2 tables just to fetch data from them... if that makes sense smiling smiley

student no: 77315138
Re: Portfolio Help
October 24, 2011 10:14AM
Hey Guys,

Thanks for the tip on INNER JOIN, I struggled yesterday quite a bit and then paged in my textbook checking to see how to get this going.
I eventually got the tables I wanted linked up and tada! eye popping smiley it works!!!!


....Never celebrate your victory too soon....
Re: Portfolio Help
October 27, 2011 10:22PM
LOL YES YOU CANT MARK BEFORE SUBMISSION
Sorry, only registered users may post in this forum.

Click here to login