PHP - Any Chance Of Some Help Please
Probably real basic but i cant get to grips with it for the life of me, can anyone correct this and explain how its done please so i gain a better understanding of php thanks.
<?php if(SELECT mode FROM settings WHERE mode = 1){ ?> Similar TutorialsWhat 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 \\\\\ I am trying to create a script that will choose from 3 different Variables. This is much like a Chance game. Variable A has a 20% chance to be chosen Variable A has a 35% chance to be chosen Variable A has a 45% chance to be chosen How would I go about setting each of these variables chance to be chosen? |