$distance=$_GET['distance']; if($distance='' || !is_numeric($distance)){$distance=10000;} Code (markup): When I echo $distance, if I entered a number in the field, $distance comes back empty.... if I entered a non-numeric string or if I don't enter anything, $distance comes back as 10000 Why would that be? Im using a form..... <form method="get" action="index.php"> <input type="text" name="distance"/> <input type="submit" name="submit" value="Search"/> </form> Code (markup): When I enter 295 into the form field, the URL looks like: http://www.......com/index.html?distance=295&submit=Search