--- a/betweenpoint.delete.php +++ b/betweenpoint.delete.php @@ -1,1 +1,19 @@ - +<?php + + $conn = pg_connect("dbname=bus user=postgres password=snmc"); + if (!$conn) { + echo "An error occured.\n"; + exit; + } + if ($_REQUEST['oldgeopo']) { + + $sql = " DELETE from stops WHERE geohash = '{$_REQUEST['oldgeopo']}'"; + $result = pg_query($conn, $sql); + if (!$result) { + echo("Error in SQL query: " . pg_last_error() . "<br>\n"); + } else { + echo "Deleted {$_REQUEST['oldgeopo']}<br>"; + } + } + flush(); +?>