$newBike->f_computerSetting = (int) $HTTP_POST_VARS["computerSetting"]; $newBike->f_riderID = $ride->f_riderID; $errMsg = $newBike->insertNew(); $ride->f_bikeID = $newBike->f_bikeID; } if (!$errMsg && $HTTP_POST_VARS["location"] == 0) { $newLocation = new RDlocation(DBConnect()); $newLocation->f_location = unFixQuotes($HTTP_POST_VARS["newLocation"]); $newLocation->f_description = unFixQuotes($HTTP_POST_VARS["newDescription"]); $newLocation->f_type = unFixQuotes($HTTP_POST_VARS["newLocationType"]); $errMsg = $newLocation->insertNew(); $ride->f_locationID = $newLocation->f_locationID; } if (!$errMsg) { if ($newRide) { $errMsg = $ride->insertNew(unFixQuotes($HTTP_POST_VARS["password"])); if (!$errMsg) { $normMsg = "Ride Inserted"; $rideID = $ride->f_rideID; $newRide = 0; } } else { $ride->f_rideID = $rideID; $errMsg = $ride->update($password); if (!$errMsg) { $normMsg = "Ride Updated"; } } } } //Get the data from the db if we aren't doing a new
$newBike->f_bike = unFixQuotes($HTTP_POST_VARS["newBike"]); $newBike->f_riderID = $ride->f_riderID; $errMsg = $newBike->insertNew(); $ride->f_bikeID = $newBike->f_bikeID; } if (!$errMsg && $HTTP_POST_VARS["location"] == 0) { $newLocation = new RDlocation(DBConnect()); $newLocation->f_location = unFixQuotes($HTTP_POST_VARS["newLocation"]); $newLocation->f_description = unFixQuotes($HTTP_POST_VARS["newDescription"]); $newLocation->f_type = unFixQuotes($HTTP_POST_VARS["newLocationType"]); $errMsg = $newLocation->insertNew(); $ride->f_locationID = $newLocation->f_locationID; } if (!$errMsg) { if ($newRide) { $errMsg = $ride->insertNew($fixedPassword); if (!$errMsg) { $getVars["rideID"] = $ride->f_rideID; header("Location: ../showRide.php" . encodeGet($getVars)); return; } } else { $ride->f_rideID = $rideID; $errMsg = $ride->update($fixedPassword); if (!$errMsg) { $getVars["rideID"] = $ride->f_rideID; header("Location: ../showRide.php" . encodeGet($getVars)); return; } } }