Jump to content
MakeWebGames

Mainmenu Help


gangsta life

Recommended Posts

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..

Link to comment
Share on other sites

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 by lucky3809
Link to comment
Share on other sites

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 by lucky3809
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...