gangsta life Posted May 6, 2011 Share Posted May 6, 2011 okay i got mainmenu design which i want to use but i dont know how to put it in with the scripting i tried many ways and get so many errors can anyone fix it please? am new and trying to leasrn off my mistakes so please show some support <?php global $db,$c,$ir, $set; $hc=$set['hospital_count']; $jc=$set['jail_count']; $ec=$ir['new_events']; $mc=$ir['new_mail']; if($ir['hospital']) { print " <ul id="menu"> <li><a href="index.php">Home</a></li> <li><a href="explore.php">Z-1. The Trails</a></li> <li><a href="bank.php">Bank</a></li> <li><a href="gym.php">Gym</a></li> <li><a href="criminal.php">Crimes</a></li> <li><a href="mail.php">Messages(<span id="msg_count">3</span>)</a></li> <li><a href="events.php">Events(0)</a></li> <li><a href="inventory.php">Inventory</a></li> <li><a href="hospital.php">Hospital[<span id='hospital'>0</span>]</a></li> <li><a href="jail.php">Jail [<span id='jail'>0</span>]</a></li> <li><a href="gangs.php">Your Gang</a></li> <li><a href="forums.php">Forums</a></li> <li><a href="newspaper.php">Newspaper</a></li> <li><a href="search.php">Search</a></li> </ul> <ul id="menu"> <li><a href="new_chat.php">Chat</a></li> <li><a href="yourfriends.php">Your Friends</a></li> <li><a href="itempedia.php">Item Guide</a></li> <li><a href="donator.php">Upgrade Account</a></li> <li><a href="preferences.php">Edit Account</a></li> <li><a href="logout.php">Logout</a></li> </ul></div> <div id="menu_foot"> <img src="images/header_24.jpg" alt="" /><br /> </div> </div> </td> <td> <div id="middle_divide"></div> </td> "; ?> i dont really want the menu divied like for example in the coding once you in hospital the menu will give you a link to hospital i dont want that i just want only 1 menu out the whole game not for it to change.. Quote Link to comment Share on other sites More sharing options...
lucky3809 Posted May 6, 2011 Share Posted May 6, 2011 (edited) yeah change print" to echo ' and the end where it's "; to '; look up print and echo statements... looked again you have if($ir['hospital']){ that would change your menu when you go into the hosp... You can easily take it out and the end of the statement } Edited May 6, 2011 by lucky3809 Quote Link to comment Share on other sites More sharing options...
gangsta life Posted May 6, 2011 Author Share Posted May 6, 2011 tried it but didnt work maybe i did it worng can you re edit and post the script for me how you said? Quote Link to comment Share on other sites More sharing options...
lucky3809 Posted May 6, 2011 Share Posted May 6, 2011 (edited) Didn't do nothing but added the $vars, and changed the print to echo... anyways <br /> is all over because of this forum... Dont know if i took them off in the places i dont have your css file... <?php global $db,$c,$ir, $set; $hc=$set['hospital_count']; $jc=$set['jail_count']; $ec=$ir['new_events']; $mc=$ir['new_mail']; echo ' <ul id="menu"><br /> <li><a href="index.php">Home</a></li><br /> <li><a href="explore.php">Z-1. The Trails</a></li><br /> <li><a href="bank.php">Bank</a></li><br /> <li><a href="gym.php">Gym</a></li><br /> <li><a href="criminal.php">Crimes</a></li><br /> <li><a href="mail.php">Messages(<span id="msg_count">'.$mc.'</span>)</a></li><br /> <li><a href="events.php">Events(0)</a></li><br /> <li><a href="inventory.php">Inventory</a></li><br /> <li><a href="hospital.php">Hospital[<span id="hospital">'.$hc.'</span>]</a></li><br /> <li><a href="jail.php">Jail [<span id="jail">'.$jc.'</span>]</a></li><br /> <li><a href="gangs.php">Your Gang</a></li><br /> <li><a href="forums.php">Forums</a></li><br /> <li><a href="newspaper.php">Newspaper</a></li><br /> <li><a href="search.php">Search</a></li><br /> </ul><br /> <ul id="menu"><br /> <li><a href="new_chat.php">Chat</a></li><br /> <br /> <li><a href="yourfriends.php">Your Friends</a></li><br /> <li><a href="itempedia.php">Item Guide</a></li><br /> <li><a href="donator.php">Upgrade Account</a></li><br /> <li><a href="preferences.php">Edit Account</a></li><br /> <li><a href="logout.php">Logout</a></li><br /> <br /> </ul></div><br /> <div id="menu_foot"><br /> <img src="images/header_24.jpg" alt="" /><br /><br /> </div><br /> <br /> </div><br /> </td><br /> <td> <br /> <div id="middle_divide"></div><br /> </td><br /> '; ?> anytime you add print or echo statement make sure all your quotes are the same they cant be mixed of double and single, it has to be one or the other....You had single quotes in your spans and all others were double thought you would know the basics, that's why i never mention it before... pays to learn before you code, there are many sites on the internet that offer tutorials, you may want to read about your echo and print statements as well as your IF statements... Edited May 6, 2011 by lucky3809 Quote Link to comment Share on other sites More sharing options...
gangsta life Posted May 6, 2011 Author Share Posted May 6, 2011 thanks lucky much love for that it worked but one problem it dont let me add announcement link with the code next to it? ({$ir['new_announcements']}) Quote Link to comment Share on other sites More sharing options...
lucky3809 Posted May 6, 2011 Share Posted May 6, 2011 it is echo statement it needs to be ('.$ir['new_announcements'].') 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.