blueman378 Posted December 9, 2007 Share Posted December 9, 2007 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 More sharing options...
JacobYaYa Posted December 9, 2007 Share Posted December 9, 2007 In that while loop down the bottom you got $row[gName] (no quotes). Link to comment https://forums.phpfreaks.com/topic/80867-solved-page-stops-loading-at-this-point/#findComment-410240 Share on other sites More sharing options...
blueman378 Posted December 9, 2007 Author Share Posted December 9, 2007 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 Link to comment https://forums.phpfreaks.com/topic/80867-solved-page-stops-loading-at-this-point/#findComment-410245 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.