daily pastebin goal
61%
SHARE
TWEET

Untitled

a guest Dec 7th, 2017 60 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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']}";
RAW Paste Data
Top