MichaelKattirtzis Posted March 10, 2016 Report Share Posted March 10, 2016 A little snipet that will help you add links for pilots over an amount of logged hours Example i let people over 80 hours to access charter flights so when they go over 80 hours a link comes up in their profile Change number 10 to less or more hours accordingly <?php $url = "http://www.websiteurl.net/index.php/charter"; $site_title = "Charter Flights"; if((Auth::$userinfo->totalhours + Auth::$userinfo->transferhours)<10) { //Dont show anything if hours are less than needed } else { Echo "<a href=$url>$site_title</a>" ; } ?> Quote Link to comment Share on other sites More sharing options...
Moderators servetas Posted March 10, 2016 Moderators Report Share Posted March 10, 2016 Or a more direct snippet. +1 for your code <?php $url = "http://www.websiteurl.net/index.php/charter"; $site_title = "Charter Flights"; if((Auth::$userinfo->totalhours + Auth::$userinfo->transferhours)>=10) { Echo "<a href=$url>$site_title</a>" ; } ?> Quote Link to comment 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.