Jump to content

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 :)

This thread is more than a year old. Please don't revive it unless you have something important to add.

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

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

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.