Hi I have used some code but I want it so when the name is NULL it is hidden, if this is possible please help.
Here is the code
<p id="top"><strong>Welcome back <?php echo $_SESSION['name']; ?> [<a href="admin/logout.php">Logout</a>]<br/>Welcome To the homepage of The Journalist's</p>
I want it to be when name is NULL, for
"<strong>Welcome back <?php echo $_SESSION['name']; ?> [<a href="admin/logout.php">Logout</a>]"
to be hidden.
Thank you.
update... This is what i have so far This is what i have so far.
<?php
if ($SESSION['name']= NULL) {
?>
<div><strong>Welcome back <?php echo $_SESSION['name']; ?> [<a href="admin/logout.php">Logout</a>]</div>
<?php
}
?>
I have fixed it , thank you for everyone that has commented. for anyone else with this problem. here is my solution.
<?php
if ($_SESSION['name']!= NULL) {
?>
<strong>Welcome back <?php echo $_SESSION['name']; ?> [<a href="admin/logout.php">Logout</a>]<br/>
<?php
}
?>