Welcome! Log In Create A New Profile

Advanced

Start prac?

Posted by Mac 
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
Mac
Start prac?
March 16, 2012 10:46AM
Anyone started the prac so the fun can begin?
Re: Start prac?
March 16, 2012 12:40PM
Almost, this is my first programming language, so I just want to grasp the fundamentals first, before I start the practical,I don't want to build a house on a unstable foundation.
avatar
Mac
Re: Start prac?
March 16, 2012 02:10PM
That is a good approach! I'm not trying to rush you, but are waiting for the confused smileyconfused smileyconfused smiley's. They will come smiling smiley
Re: Start prac?
March 16, 2012 08:50PM
Wow am so behind.....well the only way to learn is to practice....lol
Tonight am stating on the prac Mac and am gon do this....smile
avatar Re: Start prac?
March 16, 2012 11:04PM
Big Mac! how can you validate your radio buttons in such a way that when you submit and its not checked it returns the form with an error message...
and question 2. How to link the sno in my Course_Student table to many courses chosen by a student using the Insert_Lastid()? couldn't get any help off google drinking smiley
avatar Re: Start prac?
March 16, 2012 11:36PM
I have sorted out the radio button issue... I had to declare an empty string value to the variable
Language: PHP
$_POST[';ch1';] = "";
so whenever no button is selected, it passes that empty string value to it in which returns back the form. smile
I will be expecting response from anyone on the other question. Cheers!
avatar
Mac
Re: Start prac?
March 19, 2012 06:43AM
You mean mysql_insert_id? It retrieves the alst inserted ID for youi to insert with a statement - it does not insert it.
Re: Start prac?
March 19, 2012 08:41AM
I actually lied awake the whole of last night planning on how to approach the different sections of the practical... smiling smiley

Mac, is there any limitations on using our own iniatives to improve the application? Anything you don't want us to do etc.
In other words, to what extent can we change the database (add fields perhaps?) etc.
avatar
Mac
Re: Start prac?
March 19, 2012 08:51AM
As the tut says - you cannot change the db structure.
You can add in a seperate text file what you would have done if you could.
I don;t want you to add things that makes it difficult for me to mark, e.g. adding a 20 digit administator's password that I need to retype
Re: Start prac?
March 19, 2012 08:59AM
mac Wrote:
-------------------------------------------------------
> As the tut says - you cannot change the db
> structure.
> You can add in a seperate text file what you would
> have done if you could.
> I don;t want you to add things that makes it
> difficult for me to mark, e.g. adding a 20 digit
> administator's password that I need to retype

Thanks Mac
Re: Start prac?
March 19, 2012 10:40AM
I am starting tomorrow. Golly... smiling smiley
Re: Start prac?
March 19, 2012 11:14AM
Hi Mac

I haven't received my study material as yet, but i know a person who is doing the same course. Where can we get the prac.
I want to start as soon as possible.
Thanks
avatar
Mac
Re: Start prac?
March 19, 2012 12:07PM
That information is on on your study material welcoming letter, which you can download at an address I'll PM you. Do nto PM me back though - I do not use PM for course chats.
Re: Start prac?
March 19, 2012 12:18PM
Mac will we be judge just on the php or
also how the site looks?
Re: Start prac?
March 19, 2012 12:25PM
I'm not sure what the includes/config.php page entails and what exactly it must contain?
Re: Start prac?
March 19, 2012 04:38PM
Hi mac once again

The address that you provided using PM takes me back to the forum.
How can i download the prac.
avatar
Mac
Re: Start prac?
March 19, 2012 04:46PM
radhestringer72801093 Wrote:
-------------------------------------------------------
> Mac will we be judge just on the php or
> also how the site looks?


JUST the PHP. That is why I do not want smart HTML stuff smiling smiley Nothing stops you from making a nice looking site though, and you should try, but it is not a requirement. I am only interested in your PHP.
avatar
Mac
Re: Start prac?
March 19, 2012 04:48PM
77592972_innocent Wrote:
-------------------------------------------------------
> Hi mac once again
>
> The address that you provided using PM takes me
> back to the forum.
> How can i download the prac.


There is a "Downloads" link.
Re: Start prac?
March 19, 2012 05:07PM
hey guys i have started prac,php fun guys
avatar Re: Start prac?
March 20, 2012 12:00AM
mac Wrote:
-------------------------------------------------------
> You mean mysql_insert_id? It retrieves the alst
> inserted ID for youi to insert with a statement -
> it does not insert it.

yeah I mean that code... dont know how to go abt the statement that would insert it(many courses to one sno) into the course_student table. moody smiley
avatar
Mac
Re: Start prac?
March 20, 2012 06:37AM
The student selects a few courses from a list, and it is put into an array. The first code that runs on your page inserts the student into the student table, and you get the id. The next code is where the array then loops, each time inserting a cid and sno in the course_student table.
Re: Start prac?
March 20, 2012 11:11AM
Hi

I think im blind cause i cant find the download link.
I have looked everywhere but in vain.
avatar
Mac
Re: Start prac?
March 20, 2012 12:21PM
Must be. I have PMed you the direct link.
Re: Start prac?
March 20, 2012 03:25PM
This is the message i get from my PM.

Re: Start prac?
From: mac
To: 77592972_innocent
03/19/2012 12:07PM
In reply to [osprey.unisa.ac.za]

77592972_innocent Wrote:
-------------------------------------------------------
> Hi Mac
>
> I haven't received my study material as yet, but i
> know a person who is doing the same course. Where
> can we get the prac.
> I want to start as soon as possible.
> Thanks
[]

and vertical links on my left.
I really cant see the address except [osprey.unisa.ac.za]
and the other address [#$%&]
avatar Re: Start prac?
March 20, 2012 04:49PM
mac Wrote:
-------------------------------------------------------
> The student selects a few courses from a list, and
> it is put into an array. The first code that runs
> on your page inserts the student into the student
> table, and you get the id. The next code is where
> the array then loops, each time inserting a cid
> and sno in the course_student table.

The issue now is that have been trying to insert the courses selected into the course_student through implode but it inserts 0 instead... dont know what am doing wrong...
Language: PHP
$sql2="INSERT INTO course_student (sno, cid, year, fmark) VALUES ( ';" . $lastid . "';, ';" . implode(", ", $_POST[';cid';]) . "';, ';" . date(';Y';) . "';, ';" . ';100'; . "';)"; $result = mysql_query($sql2) or die(mysql_error());
avatar Re: Start prac?
March 20, 2012 04:52PM
@innocent check the link provided in your welcome letter for the tut101. Its the same link to download tut102. cheers!
avatar Re: Start prac?
March 20, 2012 06:25PM
Is it allowed to add another field to the course table that could be used to flag a row instead of deleting it?
Re: Start prac?
March 21, 2012 06:52PM
I have started, but still designing and contemplating smiling smiley
avatar
Mac
Re: Start prac?
March 22, 2012 06:36AM
77592972_innocent Wrote:
-------------------------------------------------------
> This is the message i get from my PM.
>
> Re: Start prac?
> From: mac
> To: 77592972_innocent
> 03/19/2012 12:07PM
> In reply to [osprey.unisa.ac.za]
>
> 77592972_innocent Wrote:
> --------------------------------------------------
>

The idea of a PM isa that it is not visible to the general public, so by posting it here bupasses the function thereof sad smiley The other address is the course website address?
avatar
Mac
Re: Start prac?
March 22, 2012 06:38AM
77553055 Wrote:
-------------------------------------------------------
> Is it allowed to add another field to the course
> table that could be used to flag a row instead of
> deleting it?

The tut states you are not allowed to add fields. I use that same structure to mark your prac so your field will not appear in my db.
Sorry, you can't reply to this topic. It has been closed.