Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Create a SQL statement to query the data we're looking for.
- $namesql = "SELECT fname, lname FROM $user_tbl WHERE
- username = '$_SESSION[user]'";
- // Perform the query, return the data, store it in the varible $namerows.
- $namerows = $conn->query ( $namesql );
- // Use the date to construct a real name.
- $row = $namerows->fetch (PDO::FETCH_ASSOC);
- $realname = "{$row['lname']}, {$row['fname']}";
Add Comment
Please, Sign In to add comment