I have a form with several input fields, i would like to go through and check to make sure they are all present before continuing.
This is the code i am using
if(isset($_POST['url'])){ $url = $_POST['url']; } else { echo "<error>no url</error></data></xml>"; exit(); }
if(isset($_POST['username'])){ $username = $_POST['username']; } else { echo "<error>no username</error></data></xml>"; exit(); }
if(isset($_POST['password'])){ $password = $_POST['password']; } else { echo "<error>no password</error></data></xml>"; exit(); }
if(isset($_POST['cachename'])){ $cachename = $_POST['cachename']; } else { echo "<error>no cachename</error></data></xml>"; exit(); }
if(isset($_POST['lat'])){ $lat = $_POST['lat']; } else { echo "<error>no lat</error></data></xml>"; exit(); }
if(isset($_POST['long'])){ $long = $_POST['long']; } else { echo "<error>no long</error></data></xml>"; exit(); }
if(isset($_POST['message'])){ $message = $_POST['message']; } else { echo "<error>no message</error></data></xml>"; exit(); }
if(isset($_POST['notes'])){ $notes = $_POST['notes']; } else { echo "<error>no notes</error></data></xml>"; exit(); }
if(isset($_POST['tags'])){ $tags = $_POST['tags']; } else { echo "<error>no tags</error></data></xml>"; exit(); }
The problem im getting, is even when i JUST enter a URL, it returns "no lat". Even when i fill in everything down to notes, it still returns "no lat"
Any ideas?