Pilot's alow access to a page only if they have a certain number of flying hours? [SOLVED]

Hello,

I was making a page on my site for pilots which has discount codes for them to use on flight sim websites, but i wanted them to only be able to access the page when they have completed a certain number of flying hours (so people wont just join to ge tthe discount then never being seen flying with the va again)

So I was wondering if there was a code for this?

Thanks,

James

if(AUTH::$userinfo->totalhours > 100)
{
// show-do your stuff here
}
else
{
echo “You do not have enough hours to view this page”;
}

Great thanks!

James