Welcome! Log In Create A New Profile

# Portfolio

Posted by nickkonge
Announcements Last Post
myUnisa availability 21 to 24 March 2019 03/17/2019 02:24PM
SoC Curricula 09/30/2017 01:08PM
Demarcation or scoping of examinations and assessment 02/13/2017 07:59AM
School of Computing Short Learning Programmes 11/24/2014 08:37AM
Unisa contact information 07/28/2011 01:28PM
 Portfolio August 28, 2012 10:41AM Registered: 7 years ago Posts: 44 Rating: 0
Dear Mac,
I just need a clarity on the even page, do we have to stop on the last dozen or we must go until 1?
 Re: Portfolio August 28, 2012 01:31PM Admin Registered: 13 years ago Posts: 9,408 Rating: 280
You do not stop anywhere...? If I enter 123472354576247423 it must say if it is even, odd and if it is a multiple of 12, how many times.
 Re: Portfolio August 30, 2012 08:19AM Registered: 7 years ago Posts: 44 Rating: 0
Thank you mac,
but I followed the example in the tutorial
27 is odd.
26 is even.
25 is odd.
24 is even. 24 is 2 dozen.
23 is odd.)
and these are my output
27 is odd.
26 is even.
25 is odd.
24 is even. 24 is 2 dozen.
23 is odd.
22 is even.
21 is odd.
20 is even.
19 is odd.
18 is even.
17 is odd.
16 is even.
15 is odd.
14 is even.
13 is odd.
12 is even. 12 is 1 dozen.
11 is odd.
10 is even.
9 is odd.
8 is even.
7 is odd.
6 is even.
5 is odd.
4 is even.
3 is odd.
2 is even.
1 is odd.
other ways I will remove the loop.
 Re: Portfolio August 30, 2012 03:10PM Admin Registered: 13 years ago Posts: 9,408 Rating: 280
Just an example. If it was just the above, you could hard code it i.e. if input is 26, echo even. That is not what we want. You must code the logic in...
 Re: Portfolio August 31, 2012 09:29AM Registered: 7 years ago Posts: 44 Rating: 0
Thank you Mac,
I just remove the loop and code the logic like said.
perfect
 Re: Portfolio September 18, 2012 09:31AM Registered: 7 years ago Posts: 44 Rating: 0
Is the menu links will take from escape to oop7?
eg:Escape | String | Fmod | Rand | Even | Leap | Server | Validation | oop1 | oop2 | oop3 | so on.
 Re: Portfolio September 18, 2012 11:23AM Admin Registered: 13 years ago Posts: 9,408 Rating: 280
Yes
 Re: Portfolio September 18, 2012 04:11PM Registered: 7 years ago Posts: 3 Rating: 0
Hi Nick;

Where do you get the information on oop1/oop2 etc.?

Regards
 Re: Portfolio September 19, 2012 08:31AM Registered: 7 years ago Posts: 44 Rating: 0
emokoena
 Re: Portfolio September 19, 2012 09:09AM Registered: 7 years ago Posts: 44 Rating: 0
Mac

Is it fine if I'm referring to the array index to get the user_id for oop4 page?
 Re: Portfolio September 19, 2012 10:53AM Admin Registered: 13 years ago Posts: 9,408 Rating: 280
I am not sure exactly where and how you can use an array..... but the person is selected from the drop-down (the list is generated from the db, with user_id), and the user_id is then used to extract the friends from the db.
 Re: Portfolio September 19, 2012 11:43AM Registered: 7 years ago Posts: 44 Rating: 0
Thank you Mac
I was lost this what I did
```Language: PHP\$array = array(1 => 'Peter Pan',2 => 'Elvis Presley',3 => 'Pollen Ndlanya',4 => 'Clark Kent',5 => 'Kaizer Motaung',6 => 'Lucas Radebe');
echo'<select> ';
foreach(\$array as \$key => \$name){
echo"<option value='\$key'> \$name </option>\n";
}
echo '</select>';```

I just modified the code using the database now, but my form submit the value from oop4 to user_find is that okey?
 Re: Portfolio September 19, 2012 01:35PM Admin Registered: 13 years ago Posts: 9,408 Rating: 280
Yes
 Re: Portfolio September 21, 2012 09:02AM Registered: 7 years ago Posts: 44 Rating: 0
I think that they might be a mistake in the user_friend table, because when I select user_id 2 and I get this output;

"For oop4"
User known as: King of Rock
Friends with: 2, 5
User known as: King of Rock

"but oop5"
User known as: King of Rock
Friends with: Elvis Presley
Friends with: Kaizer Motaung.

The only user Peter Pan gives the correct output compare to the tutorial letter. otherwise we have to modify the database
 Re: Portfolio September 21, 2012 09:24AM Admin Registered: 13 years ago Posts: 9,408 Rating: 280
Yes, the db info provided is not neccessarily correct.
 Re: Portfolio September 21, 2012 10:19AM Registered: 7 years ago Posts: 44 Rating: 0
Thank you mac
That's all I need to know to finish my portfolio
 Re: Portfolio September 24, 2012 06:23PM Registered: 8 years ago Posts: 2 Rating: 0
Please clarify - for the portfolio page we must continue with assignment 1 web page and add the following links in:

- even.php
- leap.php
- server.php
- validation.php
- oop1.php
- oop2.php
- oop3.php
- oop4.php
- oop5.php
- oop6.php
- oop7.php
 Re: Portfolio September 25, 2012 06:52AM Admin Registered: 13 years ago Posts: 9,408 Rating: 280
 Re: Portfolio September 25, 2012 03:07PM Registered: 8 years ago Posts: 2 Rating: 0
Hi Mac

So it is correct all the listed above is part of portfolio?

How much marks is the portfolio out of?
 Re: Portfolio September 26, 2012 08:54AM Admin Registered: 13 years ago Posts: 9,408 Rating: 280
Yes, the marks are listed in the tut letter?
 Re: Portfolio September 26, 2012 03:35PM Registered: 8 years ago Posts: 15 Rating: 0
Hi, I need help guys please, in user_find page, in an object there is this statement
`Language: PHP\$user->getUserById(\$ID);`
, to me it generate an error that the ID is undefined, but when I do something like this
`Language: PHP\$user->getUserById(1);`
, I get the answer for the first person in database, and I'm struggling on oop4, that how shold I select the data if it already selected by user_find page
 Re: Portfolio September 27, 2012 07:56AM Admin Registered: 13 years ago Posts: 9,408 Rating: 280
Start a new thread. Don't fit everything under this topic!!! I want order in this forum - you should know this by now!
 Re: Portfolio September 27, 2012 11:03AM Registered: 7 years ago Posts: 44 Rating: 0
ngoqoza
Leave the class object the way it is, but try to find a way to assign the variable \$ID with user_id from the database
e.g
```Language: PHP\$ID = \$_REQUEST['value_name']; //this value from the user table in your select list
\$user->getById(\$ID);```
it works only if the form is submitted, meant when the person select an user then click the button.
 Re: Portfolio September 28, 2012 08:29AM Admin Registered: 13 years ago Posts: 9,408 Rating: 280
Yes, that is a way to go.

No more post under this topic please- start a new descriptive topic.
Sorry, only registered users may post in this forum.