Автоматическая кнопка php php

<?php
    if (isset($_GET['var']))
{?>

<script type="text/javascript">
    document.getElementById('dateForm').submit(); // SUBMIT FORM
</script>

<?php 
}
else
{
  // leave the page alone
}
?>
Bloody Booby