I'm quite new to PHP and I've written a login script to go on my website. I can manage to style the text from my stylesheet but the username session variable I'm unable to style, how would I apply a css style to it?
My code is below...
<?php
if (isset($_SESSION["signedin"])){
echo '<a href="logout.php" class="subheading">Log Out</a>';
echo " ".$_SESSION["username"];
}
else {
echo '<a href="login.php" class="subheading">Login</a>';
}
?>
I have a style called para2 in my stylesheet which I'd like the returned username to be styled in but I can't get it to work without throwing up an error, or the page ignoring the class that's assigned to it and it defaulting to the regular blue text of the browser.
Thanks