Posted on Monday 24th March 2008 at 06:34 PM | |
schorsch Active Member |
How can I make a php page with a line also include a command to protect the only admins can enter this page? |
Posted on Wednesday 26th March 2008 at 06:30 PM | |
ShadowMage Senior Member |
try using this: PHP Code
1 2 3 4 5 6 7 8 9 10
<?php
That what you mean? |
Posted on Saturday 29th March 2008 at 07:14 PM | |
schorsch Active Member |
No I mean it <?php include("protect.php"; $rang = 5; ?> And here html code or txte only with the user rang see 5 or higher |
Posted on Tuesday 1st April 2008 at 12:43 AM | |
DanielXP Senior Member |
Do you want the protect.php page to be the page that checks to see if the user is admin? So you don't need to keep putting that code in every page you can just include it instead? |
Posted on Saturday 5th April 2008 at 09:01 AM | |
schorsch Active Member |
Yes, I would like a man that can do as in the example So test.php <?php include("protect.php"; $rang = 5; ?> Only for Admins Test2.php <?php include("protect.php"; $rang = 1; ?> For user or Higher It should be able to include the site to protect it is also the html code can use |
Posted on Sunday 6th April 2008 at 07:55 PM | |
DanielXP Senior Member |
PHP Code
1 2 3 4 5 6 7
<?php
Is your protect.php And for the include you need Code include("protect.php"); |
Posted on Monday 7th April 2008 at 08:46 AM | |
schorsch Active Member |
thx |
Posted on Tuesday 8th April 2008 at 08:16 AM | |
schorsch Active Member |
How can I make it all level 2 or higher can see the page? But level 0 and 1 not enter? |
Posted on Wednesday 9th April 2008 at 07:47 PM | |
DanielXP Senior Member |
PHP Code
1 2 3 4 5 6 7
<?php
|
Posted on Wednesday 9th April 2008 at 07:51 PM | |
DanielXP Senior Member |
Woops that will do the opersit to what u want. PHP Code
1 2 3 4 5 6 7
<?php
Thats better |