Welcome! Log In Create A New Profile



Posted by Mac 
Announcements Last Post
Announcement myUnisa availability 21 to 24 March 2019 03/17/2019 02:24PM
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
September 05, 2006 10:39AM
I've made the prac available on our course site for those students who wish to start with the prac. Due date is 9 November.

Note - you will need to send me your prac when finished. Keep in mind in order for me to run your project on our server, I have to copy your application to our server. If you code properly, your db connection info will be in listed in one page which you then "include" in all your other pages that require this connection information. I will provide you with the connection information of our database towards the end of the course so you can change it. Thus, when I run your code, it will connect to our database instead of yours.

Also, all links in your pages must be relative to the root, i.e. don't use, for example,
C:\\Program Files\xampp\htdocs\myproject\page.php as a link in your pages.

Just use myproject/page.php since I need to run your pages as localhost/myproject, and if you use C:\\Progr.... then it points to my hard drive. Is this explained clearly enough??
Anonymous User
Re: Prac
September 05, 2006 08:29PM
-So should all my php files aswell as html files be copied under the directory myproject/page.php ?

-Why will you be running from localhost if you have a online database that we can upload to?

-Will there be a wa for me to test if the programme wil run properly when i send it to you? From experience I know that one small mistake can make the whole programme fold and its almost impossible to compensate for everything without trial and error, for instance if you copy a html file to a new directory all links to images changes, this will result in display of no images!

J.A Smit

student number: 7130-387-1
Anonymous User
Re: Prac
September 05, 2006 08:36PM
what i mean by will i be able to test it if i have the connection to your server and i upload my DB I can test through the nework if my links to the DB works properly, then I just need to make sure all images html php etc is in one directory called myproject and that all links refer to this directory?? Or am I off track?

J.A Smit
Re: Prac
September 06, 2006 08:26AM
Your last question is exactly the point

i.e. - Will there be a way for me to test if the programme wil run properly when i send it to you... a new directory all links to images changes, this will result in display of no images.

This is why I say make sure ALL your links - images included - are relative to your app root folder, e.g. myproject.

If this is your directory structure:
Program Files

If you have a subdir for images under myproject, then an image is linked as images/image.jpg
Links to other pages under myproject are linked accordingly, depending if you have subfolders or not. So if a page is under myproject, then it is linked as page.php. If you have a subdir students under the myproject dir where you keep your student-related pages, then it is linked as student/student.php

In any event, the point is that if you link relative, then it will work no matter where you copy to.

There is no need to upload your content to our database. When marking, I use your application to add/edit/delete my own courses, students etc. I'm interested in the app's functionality - not the content.
avatar Re: Prac
September 07, 2006 10:55PM
Just to add what Mac said; To put it very simply: Keep everything in one directory, including the sub-directories inside it. (/images; /includes ect.) Do NOT link to an image in you My Documents folder. First copy the file INTO your project directory, then link to (or insert) it. It a common mistake, made by millions when uploading to servers. I blame windows for making it too easy smile
Anonymous User
Re: Prac
September 11, 2006 12:05AM
Thank you! That is explained well!smiling smiley

Here is another qestion that I have. If someone logs in with his username and password he the server obviously creates a user ID or session adress or something for him. So if this person goes on another part of the site the computer will always know it is him, where can I read further about this and what its it called?

Thank you

Re: Prac
September 11, 2006 08:01AM
Session management
Re: Prac
September 18, 2006 02:26PM
Do we need to incorporate user security in the prac, if so what would the default username/password be ?
Re: Prac
September 18, 2006 07:51PM
To add to allenvd's post, surely we would need three different logins: one for students, one for the admin, and one for lecturers?
Re: Elseif
September 19, 2006 02:16PM
Some help plse !?

I have the following:

} elseif (isset($_REQUEST['telw']) && $_REQUEST['telw']!=='') {
$vtelw = str_replace("(","",$_REQUEST['telw']);
$vtelw = str_replace("winking smiley","",$vtelw);

if (!is_numeric($vtelw) ) {
$errmsg = "Invalid Work Telephone Number !";

} elseif (isset($_REQUEST['cel']) .......... etc.

when the if statement mid the two elseif statements fire it causes the elseif statements following this if statement not to execute. Any suggestions ?

Also can someone explain to me the preg_replace() function escpecially the syntax of the functions' parameters.

Sorry, only registered users may post in this forum.

Click here to login