hey guys been a while how is things?
i am having a little trouble with some coding
what i am trying to do is hide a button (which is for people to log in) when they are logged in so they cannot see this
here is my current banner
on this page i am currently logged in and due to this i want the log-in and register to disappear and when i am not logged in i want the log-out to disappear
hope i have explained it ok
Thank you
Kieron
html/php code help
- hallsofvallhalla
- Site Admin
- Posts: 12023
- Joined: Wed Apr 22, 2009 11:29 pm
Re: html/php code help
several ways of doing this. quick and dirty way is to check for session id and if it does not exist then add code in PHP or javascript to add it
quick pseudo code
quick pseudo code
Code: Select all
<?php
if(!$isset($_Session['Id']))
{
echo "<a href='/logon.php' ><img src='/images/logonButton.png' ></a>";
}
Re: html/php code help
thanks for the quick reply Halls
how would i create a session start ID
Thanks
EDIT: thanks for the help managed to do what i wanted with your help
how would i create a session start ID
Thanks
EDIT: thanks for the help managed to do what i wanted with your help