Jump to content

Need help with building something


Crayon

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.

 

Archived

This topic is now archived and is closed to further replies.

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