Welcome! Log In Create A New Profile

Advanced

Manage Courses (course_man.php)

Posted by Ash-72935197 
Announcements Last Post
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 Manage Courses (course_man.php)
September 21, 2011 12:16AM
Here is a preview of my Manage Courses page, I managed to get the 'Add a new course ' and 'Delete' links to work. Currently busy working on the 'Edit' link.


<div style="color: white; background: black;">
<h1>Space Academy</h1>

<a href="student_reg.php" style="color: yellow;">Register a student</a> | <a href="course_man.php" style="color: yellow;">Manage courses</a> | <a href="student_man.php" style="color: yellow;">Manage students</a> | <a href="list.php" style="color: yellow;">View registrations</a>

<h2>Manage Courses</h2>

There are 8 courses in the `registration` database, in table `course`: <br />
<br />
<table border="1" cellpadding="10" cellspacing="0">
<tr>
<th>Course ID</th>
<th>Course Name</th>
<th colspan="2">Options</th>
</tr>

<tr>
<td>1</td>
<td>CourseA</td>
<td><a href="course_man.php?action=Edit&cid=1" style="color: yellow;">Edit</a></td>
<td><a href="course_man.php?action=Delete&cid=1" style="color: yellow;">Delete</a></td>
</tr>


<tr>
<td>2</td>
<td>CourseB</td>
<td><a href="course_man.php?action=Edit&cid=2" style="color: yellow;">Edit</a></td>
<td><a href="course_man.php?action=Delete&cid=2" style="color: yellow;">Delete</a></td>
</tr>

<tr>
<td>3</td>
<td>CourseC</td>
<td><a href="course_man.php?action=Edit&cid=3" style="color: yellow;">Edit</a></td>
<td><a href="course_man.php?action=Delete&cid=3" style="color: yellow;">Delete</a></td>
</tr>

<tr>
<td>4</td>
<td>CourseD</td>
<td><a href="course_man.php?action=Edit&cid=4" style="color: yellow;">Edit</a></td>
<td><a href="course_man.php?action=Delete&cid=4" style="color: yellow;">Delete</a></td>
</tr>

<tr>
<td>5</td>
<td>CourseE</td>
<td><a href="course_man.php?action=Edit&cid=5" style="color: yellow;">Edit</a></td>
<td><a href="course_man.php?action=Delete&cid=5" style="color: yellow;">Delete</a></td>
</tr>

<tr>
<td>6</td>
<td>CourseF</td>
<td><a href="course_man.php?action=Edit&cid=6" style="color: yellow;">Edit</a></td>
<td><a href="course_man.php?action=Delete&cid=6" style="color: yellow;">Delete</a></td>
</tr>

<tr>
<td>11</td>
<td>The X Course</td>
<td><a href="course_man.php?action=Edit&cid=11" style="color: yellow;">Edit</a></td>
<td><a href="course_man.php?action=Delete&cid=11" style="color: yellow;">Delete</a></td>
</tr>

<tr>
<td>12</td>
<td>Archery</td>
<td><a href="course_man.php?action=Edit&cid=12" style="color: yellow;">Edit</a></td>
<td><a href="course_man.php?action=Delete&cid=12" style="color: yellow;">Delete</a></td>
</tr>
</table>
<br />
<a href="course_man.php?action=Add" style="color: yellow;">Add a new course</a>

Course Name: [Text Box comes here] [Add Course Button comes here]

</div>



When the 'Add a new course' link is clicked, the same page will reappear just with an added Text Box and a Submit button labeled 'Add Course'. I've been thinking of the 'Edit' link to also make use of this Text Box with the Submit button labeled 'Edit Course'.


avatar Re: Manage Courses (course_man.php)
September 21, 2011 08:41AM
Hi Ash,

I think it will be much easier to have the Add New Course link on the top of the table not below, when mac changes the DB credentials to his, it might push the Add New Course right to the bottom depending on how many courses he has.

Plus it would be good usability for the user.

Glad to see other students making excellent progress smiling smiley

student no: 77315138
avatar Manage Courses (course_man.php)
September 21, 2011 12:09PM
That's a good point Riaz.

Here are some possibilities (what do you think about them?):
1. You can press the 'End' Keyboard button to go to the bottom of the page.
2. Using the mysql LIMIT clause to display a certain amount of courses per page with a previous and next links to go through the course list.
3. Display all the courses to the Web page.
avatar Re: Manage Courses (course_man.php)
September 21, 2011 01:24PM
1. You can press the 'End' Keyboard button to go to the bottom of the page.

I guess you could just press the end button on the keyboard to go to the bottom.

2. Using the mysql LIMIT clause to display a certain amount of courses per page with a previous and next links to go through the course list.

Pagination - Will get you extra marks thumbs up

Some help if you want to do it this way:
Pagination of MySQL Query Results

3. Display all the courses to the Web page.

I'm displaying all the courses on the web page no pager, I do however have the button on top.

It's your choice which ever way you choose is the correct choice smiling smiley

student no: 77315138
Re: Manage Courses (course_man.php)
September 23, 2011 10:27AM
Thanks for this helpful link Riaz thumbs up
Sorry, only registered users may post in this forum.

Click here to login