Atom.CMS icon indicating copy to clipboard operation
Atom.CMS copied to clipboard

part 31 echo fullname

Open Jokuta opened this issue 9 years ago • 1 comments

Hello,

I have a problem with data_user function, full name is not echoing out. I tried everything. it's part 31 from videos

*Here is my code in data.php *

function data_user($dbc, $id){

$q = "SELECT * FROM users WHERE email = '$id'"; $r = mysqli_query($dbc, $q); $data = mysqli_fetch_assoc($r); $data['fullname'] = $data['first_name'].' '.$data['last_name']; $data['fullname_reverse'] = $data['last_name'].', '.$data['first_name'];

return $data; }

and in navigation.php

Jokuta avatar May 05 '16 08:05 Jokuta

Remember that for calling the user information you need to include a call to the function. Example:

$user=data_user($dbc,'$SESSION['email'])
//--> The session variable is the one where you have stored user email

sorry for the delay, but I was sick and the i got too busy with mothers day :P

creptor avatar May 08 '16 13:05 creptor