Page 1 of 1

Hide Login

Posted: Sat Jun 01, 2002 12:39 pm
by Splime
well, i got a news login thing on my main page.. I was wondering if i could make it so only people who can update news see it.. I use php. to see look at http://splime.jamrover.com/site/index.php . I want the news login to be hidden to everyone except for me and other news people, is that possible?

Posted: Sat Jun 01, 2002 12:45 pm
by hob_goblin
well you could make a page that sets a cookie to show it, but im not really good with cookies, maybe someone else could help you, or you could look at

http://www.php.net/setcookie

and use that and if() statements

Posted: Sat Jun 01, 2002 1:10 pm
by gotDNS
In the form, i think you could say like,

Code: Select all

<?php
echo "<input ";
if(!session_is_registered("Admin")) &#123; echo "type="hidden""; &#125;
echo ">";
?>

Posted: Sat Jun 01, 2002 2:14 pm
by Splime
but, how would it know i am admin?

Posted: Sat Jun 01, 2002 2:54 pm
by MattF
You could try some EREGing with their IPs, that might work.....

Posted: Sat Jun 01, 2002 3:22 pm
by hob_goblin
you have to remember, alot of people have static IP's

Posted: Sun Jun 02, 2002 1:11 pm
by gotDNS
well, Splime, you probably would need to use something wil IP's...but instead, you could not have a form and just manually type stuff in tegh address bar. (manual get method.) Then if you wanted to you could bookmark it.