Guest User

Untitled

a guest
Dec 7th, 2017
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.40 KB | None | 0 0
  1. // Create a SQL statement to query the data we're looking for.
  2. $namesql = "SELECT fname, lname FROM $user_tbl WHERE
  3.    username = '$_SESSION[user]'";
  4.  
  5. // Perform the query, return the data, store it in the varible $namerows.
  6. $namerows = $conn->query ( $namesql );
  7.  
  8. // Use the date to construct a real name.
  9. $row = $namerows->fetch (PDO::FETCH_ASSOC);
  10. $realname = "{$row['lname']}, {$row['fname']}";
Add Comment
Please, Sign In to add comment