Jump to content

gweilo

New Members
  • Posts

    2
  • Joined

  • Last visited

gweilo's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. How can i put an variable for example $variable = 'something'; and then how do i put this into this js script <script>$(document).ready(function() {$('#open$variable').dataTable();});</script> note: Im trying to put this '$variable' inside ' ' right after #open.
  2. Hi guys so i want to make page acces to certain ranks. So im thinking for something like this rank1 -> home.php, admins.php rank2 -> home.php rank3 -> home.php rank4 -> home.php So the ranks are in a database with the page names. So now when someone logs in they will get a certain rank. So now i need to make a function that will check if the rank has access to this page. $curPageName = substr($_SERVER["SCRIPT_NAME"],strrpos($_SERVER["SCRIPT_NAME"],"/")+1); This will detect the current page that the logged in person is at now. But now how do i check if the $_SESSION['rank']; (rank1) has the access to get in page admins.php, and obviously to make $_SESSION['rank'];(rank2) redirect from the page admins.php Could someone point me in the right direction? Do i select the ranks and page names from database then put it into a array? Thanks.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.