Hello,
I have a weird problem probably due to the fact that I am new to CI.
I have an application with a user menu that conists of a list of menu. When you click on the user name, it is supposed to call a controller passing the user ID ($u_id) as a variable as indicated below :
$array=$array . "<a href=user_details?u_id=".$row->user_id.">" . $row->user_fname . "</a><BR>";
which results in a link like :
http://localhost/11/index.php/user_details?u_id=1
The controller has the line to retrieve the variable :
$u_id=intval($_GET['u_id']);
or
$u_id=$_GET['u_id'];
However I always get the error :
A PHP Error was encountered
Severity: NoticeMessage: Undefined index: u_id
Filename: controllers/user_details.php
Line Number: 9
followed by :
Fatal error: Call to a member function on a non-object in f:\easyphp1-8\www\11\system\application\controllers\user_details.php on line 13
Which is logical the variable being the criteria for my next query.
If I enter
$u_id=1;
the query works.
Can anyone help please ?
