Jump to content

Recommended Posts

Hey guys,

 

I'm not exactly sure what the term used for this is, but I'll try explaining it very thoroughly.

 

My site I'm building is this:

 

http://r-gaming.net/urban-rp/home/

 

On index.php file, I would like it so you if you're logged in (I have a logged in system already scripted), you're able to post current news. Something like this:

 

http://ls-rp.com/

 

Would anyone willing to help me by linking a tutorial to code this method 'latest news' tool? Would be greatly appreciated.

 

Crayon

Link to comment
https://forums.phpfreaks.com/topic/220182-need-help-with-building-something/
Share on other sites

if ($session->isAdmin()){

echo "Logged in - allowing the action<br />";

$action_location_or_function = "whatever you need here";

} else {

echo "Not Logged in - Not allowing the action<br />";

$action_location_or_function = "whatever you need here";

}

 

Is a few ways can do this.

Even something like below if have a field with user rights:

 

if ($user_rights >= "6"){

echo "echo your form here";

} else {

echo "You don't have sufficient rights to do that.";

}

 

 

Whatever you have and need to do, you can wrap the last end brackets so it's just used in the last else statement. I'm saying that you insert what you want done or not done within the if or else brackets.

 

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.