chiro-canto/public/upload/submitlocation.php

19 lines
509 B
PHP
Raw Normal View History

2021-03-28 20:40:17 +02:00
<?php
session_start();
$_SESSION['error_msg'] = "";
if (isset($_POST['latlng'])) {
2021-03-30 07:31:22 +02:00
$latlng = $_POST['latlng'];
$_SESSION['observation']['latlng'] = $latlng;
$_SESSION['observation']['lat'] = explode(',', $latlng)[0];
$_SESSION['observation']['lng'] = explode(',', $latlng)[1];
2021-03-28 20:40:17 +02:00
} 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');
}