<?php
 if (isset($_GET['val'])) {
  if ($_GET['val'] == "") {
   echo "bad";
  } else {
   echo "ok";
  }
 } else {
  echo 'ok';
 }
?>
