skizzy Posted October 3, 2011 Share Posted October 3, 2011 what im trying to do is create an area that lets a player know if they got a new mail or event because my new menu doesn't allow me to do it in the menu here is what i put to make it show if a player got a new event or not if($ec > 1) { print "<hr /> <font color=red>New Events</font>"; } if($ec > 1) { print " <font color=red>New Events</font>"; } if($mc > 1) { print "<hr /> and it will not show up know matter how many new mail or events you have Quote Link to comment Share on other sites More sharing options...
Smokey Posted October 3, 2011 Share Posted October 3, 2011 (edited) It looks like you have one of the > backwards. Can you post the whole section of your mainmenu that shows mails/events? Edited October 3, 2011 by Smokey Quote Link to comment Share on other sites More sharing options...
skizzy Posted October 3, 2011 Author Share Posted October 3, 2011 (edited) i tried that and it still didn't work here is all that i got that deals with it global $db,$c,$ir, $set; $hc=$set['hospital_count']; $jc=$set['jail_count']; $ec=$ir['new_events']; $mc=$ir['new_mail']; if($ir['user_level'] > 1) { print "<a href='staff.php'>Staff Panel</a><br />\n<hr />"; } if($ec > 1) { print "<hr /> <font color=red>New Events</font>"; } if($ec < 1) { print " <font color=red>New Events</font>"; } if($mc < 1) { print "<hr /> <font color=red>New Mail</font>"; } Print"<div class='mainmenu'> Edited October 3, 2011 by skizzy Quote Link to comment Share on other sites More sharing options...
Smokey Posted October 3, 2011 Share Posted October 3, 2011 try this and see if it works. if($ir['user_level'] > 1) { print "<a href='staff.php'>Staff Panel</a><br />\n<hr />"; } echo ($ec > 0)?'<a href="events.php"><font color="red">Events ('.$ec.')</font></a>':'<a href="events.php">Events (0)</a>'; } echo ($mc > 0)?'<a href="mailbox.php"><font color="red">Mailbox ('.$mc.')</font></a>':'<a href="mailbox.php">Mailbox (0)</a>'; } It should show a number count plus turn red. Quote Link to comment Share on other sites More sharing options...
skizzy Posted October 3, 2011 Author Share Posted October 3, 2011 thanx that worked Quote Link to comment Share on other sites More sharing options...
Smokey Posted October 3, 2011 Share Posted October 3, 2011 no problem :) 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.