Thanks very much for your reply,
Here is what I tried (still not working, can you see what I’m doing wrong?)
Lert me explain better:
There are 3 files involved:
1/ index.php
all that is in this file is this:
include('./cmsimple/cms.php');
2/ cms.php
here is where the login function is:
function loginbox(){global $uname,$suadm,$sn,$tx;if($uname!=""){$tmp=loginlink();$tmp.='<a href="'.$sn.'?&forum&v=profile">'.$tx['login']['profile'].'</a><BR>';if($suadm)$tmp.=u_e_print(); return $tx['login']['welcome']." ".$tmp; } else {return '
<form name="login" action="../forum/login.php" method="post" style="margin:0"><input type="hidden" name="sendLogin" value=""><input type="hidden" name="md5" value="">'.$tx['login']['name'].': <input type="text" name="name" size="12" class="search"><br><br>'.$tx['login']['pass'].': <input type="password" size="12" name="password" class="search"><br><br>'.$tx['login']['remember'].': <input name="remember" type="checkbox" checked class="search"><br><br><input type="button" name="sendLogin" value="Login'.$tx['login']['button'].'" class="search" onclick = "login.md5.value=hex_hmac_md5(login.name.value,hex_md5(login.password.value));submit(login)"></form><BR><a href="'.$sn.'?&forum&v=register">'.$tx['login']['register'].'</a>';} }
3/ an html file (my page): index.htm
With this in the code:
<?=loginbox()?> the login box is always on display.
I am trying to get this login box to show up on the page only when you click a lik: admin
I have tried to do insert the code youy gave me:
<? $action = $_GET['action'];
if($action = login)
{
loginbox();
}
?>
to replace <?=loginbox()?> and made a link admin: /cm/index.php?action=login
That just reloads the page but not show the login box on reload.
How do I do this?
Thanks for your help,
(I don't mind the page reloads or not, I just don't want to have the loginbox constantly on display, bot only when admininstrator needs to login)
Vinny