TimUSA Posted December 31, 2007 Share Posted December 31, 2007 sorry for the double post, can this please be deleted in the math board? When this submits to the database, it is not calculating $points correctly??? // CONFIGURATION SECTION $times = $_POST['boats']; $x = 0; ///POST TO DATABASE if (isset($_POST['submitted'])) { if ($_POST['points'][$x] == "DNF") $points = ($_POST['boats'] +1) * $_POST['factor']; else if ($_POST['points'][$x] == "DNS") $points = ($_POST['boats'] +1) * $_POST['factor']; else $points = $_POST['points'][$x] * $_POST['factor']; if ($_POST['factor'] == "3") { while ($x < $times) { mysql_query("INSERT INTO `ladder_points` (`memberName`, `raceDate`, `factor`, `racePoints`, `matchPoints`) VALUES ('{$_POST['name'][$x]}','{$_POST['date']}','{$_POST['factor']}','{$_POST['points'][$x]}','{$points}') "); $x++; } } else { while ($x < $times) { mysql_query("INSERT INTO `ladder_points` (`memberName`, `raceDate`, `factor`, `racePoints`, `fleetPoints`) VALUES ('{$_POST['name'][$x]}','{$_POST['date']}','{$_POST['factor']}','{$_POST['points'][$x]}','{$points}') "); $x++; } } } Link to comment https://forums.phpfreaks.com/topic/83805-not-doin-math-right/ Share on other sites More sharing options...
Barand Posted December 31, 2007 Share Posted December 31, 2007 As your other post has reply http://www.phpfreaks.com/forums/index.php/topic,174931.0.html I'll close this. Link to comment https://forums.phpfreaks.com/topic/83805-not-doin-math-right/#findComment-426613 Share on other sites More sharing options...
Recommended Posts