mattsmith Posted May 10, 2014 Report Posted May 10, 2014 When i'm flying my website shows me logged in 3 times, does anyone know how to fix this? Quote
RocketRod Posted May 10, 2014 Report Posted May 10, 2014 Where does it show you logged in 3 times? ACARS Map, Home page? Screenshot? Quote
Administrators simpilot Posted May 15, 2014 Administrators Report Posted May 15, 2014 Add this just prior to your loop $shown = array(); Add this to your loop for the users online. if(in_array($pilot->pilotid, $shown)) {continue;} else {$shown[] = $pilot->pilotid;} It should end up looking something like this <?php $shown = array(); foreach($usersonline as $pilot) { if(in_array($pilot->pilotid, $shown)) continue; else $shown[] = $pilot->pilotid; echo '<img src="'.Countries::getCountryImage($pilot->location).'" alt="'.Countries::getCountryName($pilot->location).'" />'; echo " {$pilot->firstname} {$pilot->lastname};} ?> Quote
Administrators simpilot Posted May 15, 2014 Administrators Report Posted May 15, 2014 Where ever you have the code for your online list, you say it is on the home page so I would guess it is in the template for the homepage. Quote
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.