Jump to content

a problem i cant find


blueman378

Recommended Posts

hi guys, can someone please look through this to find any errors

 

<div id="wrapper" style="width: 92%;" align="center">
<div id="header">
<div class="heada">
<div class="headc">
<table border="0" cellspacing="0">
<tbody><tr>
<td><a linkindex="0" href="http://localhost/" title=""><img class="logo" src="images/logo.png" alt="Game Script" border="0" height="84" hspace="10" width="284"></a></td>
<td rowspan="2" valign="top">
<div class="topmenu">
<a linkindex="1" href="http://localhost/page-memberlist" class="topmenu">Memberlist</a> | <a linkindex="2" href="http://localhost/page-about_us" class="topmenu">About Us</a> | <a linkindex="3" href="http://localhost/page-help" class="topmenu">Help</a> | <a href="mailto:" class="topmenu">Contact Us</a> | 
<a class="topmenu" href="mailto:?subject=Play%20Free%20Games%20at%20HCB%20Games%21">Tell a Friend</a> | <a class="topmenu" href="http://localhost/">Bookmark Us</a>
</div>
<div class="quickgame"><?php
if ($_SERVER['REQUEST_METHOD'] != 'POST'){
?><form> <?php 
//gameform
global $database;
    $q = "SELECT gName FROM " . games . "
          ORDER BY `gName` ASC
         ";   
    $result = $database->query($q) or die("Error: " . mysql_error()); 
    /* Error occurred, return given name by default */
    $num_rows = mysql_numrows($result);
    if( $num_rows == 0 ){
      return 'Games not found!';
    }
?>
Quick Play: <select id="games" name="game" onchange="location = '' + this.options[this.selectedIndex ].value;">
<option value="">--select a game--</option>
<?php
   while( $row = mysql_fetch_assoc($result) ) {
    echo '<option value="showgame.php?game=' . $row['gName'] . '">';
    echo $row[gName] . '</option>';
    }
}
?>
</select>
</form>	
<img src="images/px.gif" align="absmiddle" height="23" width="4">
</div>
</td>
</tr>
</tbody></table>

</div>
</div>
</div>


<div id="submenu">
<div class="submenua">
<div class="submenuc">
<div>
<a linkindex="5" href="http://localhost/cat-1-p0.html" class="submenu">Action / Adventure</a>   |   <a linkindex="6" href="http://localhost/cat-8-p0.html" class="submenu">Beat em up</a>   |   <a linkindex="7" href="http://localhost/cat-5-p0.html" class="submenu">Other</a>   |   <a linkindex="8" href="http://localhost/cat-3-p0.html" class="submenu">Puzzle</a>   |   <a linkindex="9" href="http://localhost/cat-6-p0.html" class="submenu">Racing</a>   |   <a linkindex="10" href="http://localhost/cat-7-p0.html" class="submenu">Retro</a>   |   <a linkindex="11" href="http://localhost/cat-4-p0.html" class="submenu">Shoot 'em up</a>   |   <a linkindex="12" href="http://localhost/cat-2-p0.html" class="submenu">Sports</a></div>
</div>
</div>
</div>

<div id="submenushadow">
<div class="sushada">
<div class="sushadc">
</div>
</div>
</div>

<div class="wrappera">
<div class="wrapperc">

Link to comment
https://forums.phpfreaks.com/topic/80688-a-problem-i-cant-find/
Share on other sites

The only thing apparent from the information provided in the post is the global $database; line of code has absolutely no effect because the global keyword only has meaning when used inside of a function.

 

Without specific information as to what it is or is not doing, no one in a forum can possibly answer your question.

Link to comment
https://forums.phpfreaks.com/topic/80688-a-problem-i-cant-find/#findComment-409360
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.