Welcome! Log In Create A New Profile

Advanced

user_find.php19

Posted by ngoqoza 
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
user_find.php19
September 25, 2012 05:01PM
Hi, Anybody to help me people, I tried all my best but I can't get the answer. In user_find.php page, there is a User object called user e.g. $user = new User(), under this object I'm struggling on how to initialize a user_id from database, because in tutorial letter it is initialized like this
Language: PHP
$user->getUserById($ID);
, whereas it should be a number like this
Language: PHP
$user->getUserById(1);
, so if it a number, I dont think it a good idea because, I'll have to select from a list, in oop4.php
Re: user_find.php19
October 05, 2012 02:44PM
confused smiley Also have the same issue. It displays error message:
Fatal error: Call to undefined method User::getUsedById() in C:\Program Files\EasyPHP-5.3.3\www\user_find.php on line 27
avatar
Mac
Re: user_find.php19
October 05, 2012 03:04PM
Struggle a bit more, no use giving the answer smiling smiley
Re: user_find.php19
October 08, 2012 12:16PM
After a weekend struggle, I finally found my errors. Incorrect name used. Task completed. Phew! smile
avatar
Mac
Re: user_find.php19
October 09, 2012 07:24AM
It usually is a typo.
Re: user_find.php19
October 26, 2012 03:16PM
Good Afternoon Mac,

I know many students have asked the similar question.
about:
Hi, Anybody to help me people, I tried all my best but I can't get the answer. In user_find.php page, there is a User object called user e.g. $user = new User(), under this object I'm struggling on how to initialize a user_id from database, because in tutorial letter it is initialized like this

$User = new User();
$User=getUserById($ID) and it's not running even getUserBy($user_id) not running but getUserById(user_id) not giving the required results?

Fatal error: Call to undefined method User::getUsedById()?

I understand you told other students is typo error can you please give more tips???
avatar
Mac
Re: user_find.php19
October 26, 2012 03:42PM
The error says that method is undefined, i.e.it does not exist. Why does it not exist? Perhaps a typo when it is called? Read letter by letter: User::getUsedById()
Sorry, only registered users may post in this forum.

Click here to login