View Single Post
Old 12-30-2012, 05:01 AM   PM User | #1
jhdavey
New to the CF scene

 
Join Date: Dec 2012
Posts: 1
Thanks: 1
Thanked 0 Times in 0 Posts
jhdavey is an unknown quantity at this point
Help registering session variables then echo

FIXED THE SESSION VARIABLES. NOW,

I am trying to figure out how to echo an html p element with the $_SESSION variable within the paragraph element

here's my code so far:
Code:
<?php
		if (!isset ($_SESSION['username']))
		{
			echo "<a id='reglink' href='register.html' alt='Register'>Register</a>
			<a id='loginlink' href='login.html' alt='Login'>Login</a>";
		}
		else
		{
			echo 'Welcome' . 'back' . ' ' . $_SESSION['username'] . '!';
		}
		?>
this is will echo the sentence with the correct username, however, i do not have my css style attached to it..
any help is much appreciated!

Last edited by jhdavey; 12-30-2012 at 06:45 AM..
jhdavey is offline   Reply With Quote