10000000) { $_SESSION['error_msg'] .= "The file size must be below 10MB. \n"; } if (move_uploaded_file($_FILES['file']['tmp_name'], $target_file)) { echo "The file ". htmlspecialchars(basename($_FILES['file']['name']))." has been uploaded."; } else { echo "Sorry, there was an error uploading your file"; } $_SESSION['observation']['file'] = basename($_FILES['file']['name']); $_SESSION['error_msg'] = ""; if (isset($_POST['species'])) { $_SESSION['observation']['species'] = $_POST['species']; } else { $_SESSION['error_msg'].= "Error, incorrect species name.\n"; } if (isset($_POST['subspecies'])) { $_SESSION['observation']['subspecies'] = $_POST['subspecies']; } else { $_SESSION['observation']['subspecies'] = ""; } if (isset($_POST['recording-license'])) { $_SESSION['observation']['license'] = $_POST['recording-license']; } else { $_SESSION['error_msg'] .= "Incorrect license\n"; } if (isset($_POST['name'])) { $_SESSION['observation']['name'] = $_POST['name']; } else { $_SESSION['error_msg'] .= "Incorrect Recordist Name.\n"; } if (isset($_POST['loc-country'])) { $_SESSION['observation']['country'] = $_POST['loc-country']; } else { $_SESSION['error_msg'] .= "Incorrect Country. \n"; } if (isset($_POST['recording-date'])) { $_SESSION['observation']['date'] = $_POST['recording-date']; } else { $_SESSION['error_msg'] .= "Incorrect date. \n"; } if (isset($_POST['recording-time'])) { $_SESSION['observation']['time'] = $_POST['recording-time']; } else { $_SESSION['error_msg'] .= "Incorrect time. \n"; } if (isset($_POST['sound-type-option'])) { $_SESSION['observation']['type'] = $_POST['sound-type-option']; } else { $_SESSION['error_msg'] .= "Incorrect sound type. \n"; } if (isset($_POST['quality'])) { $_SESSION['observation']['quality'] = $_POST['quality']; } else { $_SESSION['error_msg'] .= "Incorrect quality value.\n"; } if (isset($_POST['remarks'])) { $_SESSION['observation']['remarks'] = $_POST['remarks']; } } if ($_SESSION['error_msg'] == "") { header('Location: '.'index.php?step=verify'); } else{ $_SESSION['error_msg'] .= "Please try again.\n"; header('Location: '.'index.php?step=metadata'); }