You are not logged in.
Hey all
I'm doing a php project for my degree, I have to design and implement an auction site.
Now, what I want is for there to be a bar (i.e. just a table row (two columns)) going across the top of the screen. One table cell holds my website logo, so that's permanent. The other cell needs to:
a) show a login box if no-one is logged in. You are logged in if $_SESSION('LoggedIn') is TRUE.
b) show 'Welcome, $username' or some such if the user is logged in.
Now, this needs to be included on every page, so I guess it'll just be put into an include file. My problem is, I just can't get it to work. Either the login message is displayed under the table, or a new table is displayed, or it just doesn't work.
I.e. if you are NOT logged in, and then login, a new image and message is displayed underneath the old - I need the page to be refreshed, but I'm not sure how.
Any ideas? Also, does the php just need to be embedded? E.g.:
<html>
<body>
<table>
<td>
<?php if (loggedin) {
blah;
}
else { blah2}
?>
</td>
</table>
</body>
</html?
Ta.
T
Offline
hey hey hey!
You want us to do your work.
Try asking in HTML or php forums, maybe there you'll find a freak that'll do your work for you.
Offline
dude, you asked and answered your question in logical way - just sit and do it! http://lt.php.net/manual/en/ is your friend!
Offline
Heh, sorry guys. Got it sorted now, tho not quite how I wanted.
Infernal - I realise my question is somewhat answered, my problem was (I think) with syntax, hence me getting the wrong results.
I've now fixed the issue by creating a login.php script which is linked to unless the use is logged in.
T
Offline