Jump to content

Accessing page with querystring


Manaus
 Share

Recommended Posts

Greetings,

Assuming you have your users logging in before they try to access the page in question, you could use something like this:

<?php
if ($user->isSuperuser() OR $user->hasRole("admin"))  // If user has one of these roles, he/she sees the page.
{ 
	if ($input->get->project == 14) // Test if the query string has this value.
	{ ?>
		<div class="private">
			Do Whatever You Need Here
		</div>	
	<?php
	}
} ?>

Everything that can only be seen by authenticated users goes into the "private" div.

Thanks,

Matthew

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...