Welcome! Log In Create A New Profile

Advanced

Task 3A and 3B.

Posted by Anonymous User 
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
Anonymous User
Task 3A and 3B.
March 26, 2009 10:56PM
Task 3A and 3B has been completed successfully, thanks to previous forums.
Re: Task 3A and 3B.
March 27, 2009 03:24PM
3A and 3B completed
Re: Task 3A and 3B.
March 28, 2009 02:52PM
I thought we are supposed to enter our entries under existing entries IF THEY EXIST?

Task 3B completed successfully.
avatar
Mac
Re: Task 3A and 3B.
March 29, 2009 09:20AM
If the topic exists, you enter it. If the topic does not exist, then you create the topic...
Re: Task 3A and 3B.
March 30, 2009 04:43PM
Maybe this is easier for people to understand cool smiley

Language: PHP
<?php   CheckTopic($_POST['tasknumber'], $exists);   if ($exists) { echo "Topic already exists, please make you post there"; } else { CreateNewTopic($_POST['tasknumber']); }   ?>

Sorry i was bored...
avatar
Mac
Re: Task 3A and 3B.
March 30, 2009 08:56PM
Mmmmm

Where did you get $exists from huh? And you need to define the functions first! So I'm afraid this will get you 1/10 only smiling smiley
Re: Task 3A and 3B.
March 31, 2009 03:23PM
Come on - 100% for innovation and creativity!
Re: Task 3A and 3B.
March 31, 2009 03:43PM
mac Wrote:
-------------------------------------------------------
> Mmmmm
>
> Where did you get $exists from huh? And you need
> to define the functions first! So I'm afraid this
> will get you 1/10 only smiling smiley


spinning smiley sticking its tongue out,

Well i wasn't bored enough to write the functions, so I assumed they were part of the forum code. Maybe sumone else would care to contribute.

version 2

Language: PHP
<?php   CheckTopic($_POST['tasknumber']);   if ($exists) { echo "Topic already exists, please make you post there"; } else { CreateNewTopic($_POST['tasknumber']); }   ?>

$exists is a BOOLEAN value returned by CheckTopic drinking smiley
avatar
Mac
Re: Task 3A and 3B.
March 31, 2009 04:14PM
Guess you then know how to make it available outside the function hehe? mmmm, I can't wait for the prac to start smiling smiley
avatar Re: Task 3A and 3B.
April 07, 2009 11:52PM
Task 3B completed.
Sorry, only registered users may post in this forum.

Click here to login