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
Re: Start prac?
March 22, 2012 07:51AM
I'm not sure what the includes/config.php page entails and what exactly it must contain?
Re: Start prac?
March 22, 2012 09:11AM
Im nervous now.
Is the project the one on the html folder where you have to create a signup page with these database fields
memberID
username
password
signupDate
email


Really am worried
avatar Re: Start prac?
March 22, 2012 01:54PM
mac Wrote:
-------------------------------------------------------
> 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.

So how do we go about it? or should we just write a text on how it would be done and include it in the folder...
Re: Start prac? : @alwyn
March 22, 2012 02:12PM
@alwyn
You put your database connection details in there. By "including" it in a page, your page has got access to it. Reason - so that when you in future have to change your connection details ( for instance, when you take your site live, instead of it running on your pc) you can change the connection details in one place (your config file), instead of going to each page to do it. So it is nothing complicated. Just sounds it smiling smiley
avatar Re: Start prac?
March 22, 2012 07:31PM
@Innocent you need to download the tut102 to get started! Any other thing other than this is futile... Trust me!
avatar
Mac
Re: Start prac?
March 23, 2012 07:19AM
77471466_Alwyn Wrote:
-------------------------------------------------------
> I'm not sure what the includes/config.php page
> entails and what exactly it must contain?


The config file includes the connection details to the db. You include it on every page, so that when you send your prac to me, I change the db connection details to fit my login details. I only have to do it once in the config file, and not on every page. So it helps with portability of code - when you upload your code to a server, you do nto want to have to go and enter the login details they provide you on 1000 pages.
avatar
Mac
Re: Start prac?
March 23, 2012 07:20AM
> So how do we go about it? or should we just write
> a text on how it would be done and include it in
> the folder...

Yes, as it is explained in the tut letter.
Re: Start prac?
March 23, 2012 08:16AM
mac Wrote:
-------------------------------------------------------
> 77471466_Alwyn Wrote:
> --------------------------------------------------
> -----
> > I'm not sure what the includes/config.php page
> > entails and what exactly it must contain?
>
>
> The config file includes the connection details to
> the db. You include it on every page, so that when
> you send your prac to me, I change the db
> connection details to fit my login details. I only
> have to do it once in the config file, and not on
> every page. So it helps with portability of code -
> when you upload your code to a server, you do nto
> want to have to go and enter the login details
> they provide you on 1000 pages.

Gaia77490614 Wrote:
-------------------------------------------------------
> @alwyn
> You put your database connection details in there.
> By "including" it in a page, your page has got
> access to it. Reason - so that when you in future
> have to change your connection details ( for
> instance, when you take your site live, instead of
> it running on your pc) you can change the
> connection details in one place (your config
> file), instead of going to each page to do it. So
> it is nothing complicated. Just sounds it smiling smiley

So it's basically just the php code for connecting to your database in a seperate file config.php and you only include it on every other page?
Thanks, that is simple grinning smiley Sounded way more complicated, hehe
Re: Start prac?
March 23, 2012 11:17AM
Where can i download that the tut102.
avatar Re: Start prac?
March 23, 2012 11:36AM
@Mac Great! @Innocent pm me your email, let me send it there. cos i guess the forum restricts the link from been shown.
avatar
Mac
Re: Start prac?
March 23, 2012 01:44PM
77553055 Wrote:
-------------------------------------------------------
> @Mac Great! @Innocent pm me your email, let me
> send it there. cos i guess the forum restricts the
> link from been shown.

I have sent it several times now..... you try? Innocent, what is going on huh?
avatar Re: Start prac?
March 23, 2012 02:37PM
@Mac I have actually sent it to his email directly. Am waiting for his response.
Re: Start prac?
March 23, 2012 03:15PM
@ i have email you my email.
Thanks a lot.
avatar Re: Start prac?
March 23, 2012 03:31PM
Best of luck...
Re: Start prac?
March 25, 2012 03:19PM
Finally started with the site!spinning smiley sticking its tongue out I've set up the database and the html, now it's just the php that awaits, I didn't see a database name in the tut letter, so I assume we must code this in the config.php file, so Mac can change it there, can anyone confirm this?
Re: Start prac?
March 25, 2012 04:16PM
need tut plz help
thank you in advance grinning smiley
avatar Re: Start prac?
March 25, 2012 04:19PM
77528204 Wrote:
-------------------------------------------------------
> Finally started with the site!spinning smiley sticking its tongue out I've set up the
> database and the html, now it's just the php that
> awaits, I didn't see a database name in the tut
> letter, so I assume we must code this in the
> config.php file, so Mac can change it there, can
> anyone confirm this?

the database name is registration. Read your tut102 over and over... @radhestringer72801093 pm your email address let me send it there. cheers!
Re: Start prac?
March 25, 2012 04:57PM
77553055 Wrote:
-------------------------------------------------------

> the database name is registration. Read your
> tut102 over and over... @radhestringer72801093 pm
> your email address let me send it there. cheers!

Thanks, seems I missed that part I will read it again... and again...etc
Re: Start prac?
March 26, 2012 09:17AM
Thanks guys really appreciate.

If the Database structure consist of these tables course, student, course_student that means i have started. huh huh huh.........

My question though is does it matter if the tables are MYISAM OR INNODB.
Thanks
avatar
Mac
Re: Start prac?
March 26, 2012 09:22AM
77592972_innocent Wrote:
-------------------------------------------------------
> Thanks guys really appreciate.
>
> If the Database structure consist of these tables
> course, student, course_student that means
> i have started. huh huh huh.........
>
> My question though is does it matter if the tables
> are MYISAM OR INNODB.
> Thanks

Does not matter. Read here http://www.mikebernat.com/blog/MySQL_-_InnoDB_vs_MyISAM
Re: Start prac?
March 26, 2012 10:20AM
And also do we have to submit the prac with sample data to populate the database, which means we have to create a separate script to run first?
Especially the course and student tables
Re: Start prac?
March 26, 2012 10:33AM
I think it will make sense to check if the table is empty and if so then to populate it with some initial data, especially for the course table so that when a user visits the site there will be at least one course to select from and it will make it easier for mac to grade the prac unless Mac's database is already filled, mmm... I would also like to know what Mac says about this.
Re: Start prac?
March 26, 2012 11:14AM
What if we create an administration section to cater for the population of database?
Re: Start prac?
March 26, 2012 12:06PM
If we choose to add initial data to the student table some data inconsistencies may arise, for example, if all the data from the student table is deleted, when a new user will enter the site it will populate the database with these example entries, but I think its safe to populate the course table if there is no entries, and include an if statement to add a new course entry before deleting the last one,

Language: PHP
function populate($arrayforcourse, $coursetable){ $empty=$checktable; //$checktable=boolean code to check if table is empty   if ($empty==true){ // code to populate $coursetable with $arrayforcourse
however then you must add code to prevent the table to be populated with example courses, the example courses should only be added once
Language: PHP
function delete($table, $id){ $lastone=$checklastone; //$checklastone= boolean code to check if it is the last entry in table if ($lastone==true){ // code to display error message to add a new record before deleting this one } else { //code to delete record }

this is just my approach, but I would still like to know if there will be entries in Mac's database
avatar
Mac
Re: Start prac?
March 26, 2012 12:59PM
I am not marking the information in your db, I am marking your code. Another way to say it.... since I have my own db and just use your code to play with my db, what I will see is what I have in my db.
Re: Start prac?
March 26, 2012 02:29PM
I've been closely following the MVC architecture which is used in most application out there. Can i implement the structure using that architecture?
avatar
Mac
Re: Start prac?
March 27, 2012 06:56AM
The app required is in a sense a MVC architecture itself. These are just nice wordsto describe the process.
Re: Start prac?
March 27, 2012 10:18AM
Is it ok if i progressively paste my code as i develop the application so the guys can correct me if im wrong?
Re: Start prac?
March 27, 2012 10:46AM
mac Wrote:
-------------------------------------------------------
> The app required is in a sense a MVC architecture
> itself. These are just nice wordsto describe the
> process.

I like the way you answer bro......thumbs up
Re: Start prac?
March 27, 2012 11:50AM
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.

dont understand this eye popping smiley ""the link will just be named Register for a course"".
Sorry, you can't reply to this topic. It has been closed.