Zugzwangle Posted August 6, 2010 Share Posted August 6, 2010 What is the error in this code? It's such a simple bit of code, but doesnt work... So make me look stupid by pointing out my coding error!!! Good luck!! $dbName = $_GET['dbIdent']; $dirArr = scandir(("uploadedPGN/gameDatabases/"), 0); foreach ($dirArr as $key => $value) { if (is_null($value) || $value=="." || $value==".." || $value=="...") { unset($dirArr[$key]); } } ///// works all the way to here \\\\\ echo '<form method="POST"><select name="process"><OPTION>Select Database: </OPTION>'; foreach($dirArr as $val2) { echo '<OPTION value="processPGN_NONANCL_DB.php?dbIdent='.$val2.'">'.$val2.'</OPTION>'; } echo '</select><input type="submit"></form>'; ////// so why is the little bit of code above causing me such a nightmare? grrr \\\\\ Quote Link to comment https://forums.phpfreaks.com/topic/209991-here-is-your-chance-to-make-me-look-a-bit-silly/ Share on other sites More sharing options...
Maq Posted August 6, 2010 Share Posted August 6, 2010 You can temporarily set error reporting on and to max by putting these 2 lines directly after your opening <?php tag: ini_set ("display_errors", "1"); error_reporting(E_ALL); Quote Link to comment https://forums.phpfreaks.com/topic/209991-here-is-your-chance-to-make-me-look-a-bit-silly/#findComment-1096035 Share on other sites More sharing options...
Zugzwangle Posted August 6, 2010 Author Share Posted August 6, 2010 Thats a useful bit of code!!!: ini_set ("display_errors", "1"); error_reporting(E_ALL); I'll use that in future cases or error... However no error has been thrown up!! Grrr.. I'm at a loss.. Quote Link to comment https://forums.phpfreaks.com/topic/209991-here-is-your-chance-to-make-me-look-a-bit-silly/#findComment-1096039 Share on other sites More sharing options...
Maq Posted August 6, 2010 Share Posted August 6, 2010 Define "doesn't work". Does that mean a blank page, doesn't do what it's supposed to, what happens? Quote Link to comment https://forums.phpfreaks.com/topic/209991-here-is-your-chance-to-make-me-look-a-bit-silly/#findComment-1096044 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.