chiro-canto/public/upload/submitlocation.php
2021-04-15 12:29:53 +02:00

19 lines
509 B
PHP
Executable File

<?php
session_start();
$_SESSION['error_msg'] = "";
if (isset($_POST['latlng'])) {
$latlng = $_POST['latlng'];
$_SESSION['observation']['latlng'] = $latlng;
$_SESSION['observation']['lat'] = explode(',', $latlng)[0];
$_SESSION['observation']['lng'] = explode(',', $latlng)[1];
} else {
$_SESSION['error_msg'].= "Incorrect coordinates, please try again.";
}
if ($_SESSION['error_msg'] == "") {
header('Location: '.'index.php?step=metadata');
} else {
header('Location: '.'index.php?step=location');
}