Jump to content

[SOLVED] page stops loading at this point,


blueman378

Recommended Posts

hi guys, i have a page, the page stops loading after this is initialized

<?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="selectgame" onchange= "location = 'showgame.php?game=' 

+ this.options[this.selectedIndex ].value;">
<option value="">--select a game--</option>
<?php
   while( $row = mysql_fetch_assoc($result) ) {
    echo '<option value="' . $row['gName'] . '">';
    echo $row[gName] . '</option>';
    }
}
?>
</select>

 

any ideas?

Link to comment
https://forums.phpfreaks.com/topic/80867-solved-page-stops-loading-at-this-point/
Share on other sites

thanks, the actual problem was i had no games installed, so because it could not find any games...

 

well this part kills the script :

if( $num_rows == 0 ){
      return 'Games not found!';

 

so a simple solution... I KILLED IT :)

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.