You put the code in step 5 at the top of the pages you have to login to view.

You put the code in step 5 at the top of the pages you have to login to view.
Lets set the stage on fire, and hollywood will be jealous.
Yeah, as tom said.
Sorry should have specified that better?
since I know nothing about PHP, you could tell us where to put what etc.
Well if the code is shown then below it, it says "Page here?" surely it is common sense to assume that the page continues below that code...
This tut has helped me expand my PHP/MySQL knowledge quite well. I'm developing a usersystem for my site with it. Cheers.
When he says "with it" I think he means his new-found php and mysql knowledge. I duno :rolleyes:
Also, didn't say you shouldn't just recommended that you didn't as it is really basic.
Ive created a row which is called adminlevel and i want it so people with adminlevel 1 can use the register.php only how do i do it?
I'm not guna tell you how to do it all, but here's how you'd start:
Code:<?php $username = $_SESSION['username']; $select = mysql_query("SELECT * FROM `users` WHERE `username`='".$username."'"); $select2 = mysql_fetch_array($select); $level = $select2['adminlevel']; if($level=1 || $level='1') // I didn't know how'd you done it { // Show the page } else { // Tell them to go and die } ?>
Want to hide these adverts? Register an account for free!