Crayon Posted November 29, 2010 Share Posted November 29, 2010 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 Quote Link to comment https://forums.phpfreaks.com/topic/220182-need-help-with-building-something/ Share on other sites More sharing options...
QuickOldCar Posted November 30, 2010 Share Posted November 30, 2010 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. Quote Link to comment https://forums.phpfreaks.com/topic/220182-need-help-with-building-something/#findComment-1141186 Share on other sites More sharing options...
Crayon Posted November 30, 2010 Author Share Posted November 30, 2010 Hey, thanks for the quick reply. Would you happen to have a detailed tutorial on how to set one of these up? I'm still a beginner in PHP. Thanks dude. Quote Link to comment https://forums.phpfreaks.com/topic/220182-need-help-with-building-something/#findComment-1141201 Share on other sites More sharing options...
Crayon Posted November 30, 2010 Author Share Posted November 30, 2010 Anyone? Quote Link to comment https://forums.phpfreaks.com/topic/220182-need-help-with-building-something/#findComment-1141558 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.