button help

Hi everyone I am having trouble with coding a button How do I code a button that checks if you are logged in
for example if you wanted to join a discussion the button might say join but on roll over if you were not logged in it would say log in and redirect to the log in/register page thanks in advance for any help

We need you to explain allot better but I think I know what you mean.

Can you post us your login script so we know how you have made your login.

like Bleed-Obsidian said you need to post your codes so we see if you use cookies or session to authenticate logged users.

for example if you used session just put an if statement to check if the session exist and then do this

[php]
if (@$_SESSION[‘session_name’] = “the value you gave when you first set tge session”)
{
echo “”;
}else
{
echo “”;
}
[/php]

and then just check which button was press to take the action using the header to redirect to the correct page.
I think that should help you. But post your codes so we help you better.

Sponsor our Newsletter | Privacy Policy | Terms of Service