public function view_user($id_no) { $query = "select * from userinfo where uid=" . $id_no; $records = $this->db->query($query); return View_user_model::instantiate($records); }
<div class="main_block"> <br> <h2> User registered on the forum: </h2> <br><br> <?php $records = array(); $records = View_user_model::view_user($id_no); if ($pic_bool == "true") { $path = base_url() . "assets/profile_pics/" . $id_no . ""; } else { $path = base_url() . "assets/images/default.jpg"; } echo "\n\t\t\t<div class=\"img_left\" ><img src=" . $path . "></div>\n\t\t\t<table class=\"table_right\">\n\t\t\t\t<tr>\n\t\t\t\t\t<td>User :\n\t\t\t\t\t<td>" . $records[0]->nickname . "\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td>Name :\n\t\t\t\t\t<td>" . $records[0]->name . "\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td>Surname :\n\t\t\t\t\t<td>" . $records[0]->surname . "\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td>Location :\n\t\t\t\t\t<td>" . $records[0]->location . "\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td>Speciality :\n\t\t\t\t\t<td>" . $records[0]->specialization . "\n\t\t\t\t</tr>\n\t\t\t</table>"; ?> </div> </div>