can anyone help me with the situation I'm in. I've been trying to find answers on how to display a user's first name, last name email...etc from the table that has the info stored but my only luck with echoing this info is only getting either ALL the info for a certain feel to show like all emails instead of just 1 specific email for the user or I just end up with mysql errors.
here's my index.php source
<?php
session_start();
if (isset($_SESSION['id'])) {
// Put stored session variables into local php variable
$userid = $_SESSION['id'];
$email = $_SESSION['email'];
$firstname = $_SESSION['first_name'];
$lastname = $_SESSION['last_name'];
$businessname = $_SESSION['company_name'];
$country = $_SESSION['country'];
$plan = $_SESSION['plan'];
} else {
header("Location: http://somewebsite.com");
}
include 'connect.php';
$first_name = $_GET['first_name'];
$last_name = $_GET['last_name'];
?>
for instance I would like to echo the user's first name in the header
<span class="username">USER</span> <--replace user with logged in user's firstname n last name-->
echothe user’s first name? What’s the problem?