When this page loads up it shows a text box so that the user can change the date in the program. The only thing is when they hit enter it just reloads the page. If they click the submit button everything works. Is there something I am doing wrong. Some of the users are used to hitting the submit button on webforms. Maybe this isnt a php issue but any help would be great.
<?
// This is the page to change the date
if(isSet($_POST["btnSubmit"])){
$date = $_POST["date"];
$body = <<<EOBODY
<HTML
<HEAD>
<TITLE>CLose</TITLE>
<script language="javascript" type="text/javascript">
function doNow(){
window.opener.location.href = "ccs.php?date=$date";
window.close();
}
</script>
</HEAD>
<BODY onLoad="doNow()">
</BODY>
</HTML>
EOBODY;
echo $body;
exit();
}else{
$self = $_SERVER["PHP_SELF"];
$body = <<<EOBODY
<html>
<head>
<title>Change Date</title>
</head>
<body background="287.jpg">
<form action="$self" method="post">
<table align="center" cellpadding="3" cellspacing="0">
<tr>
<td colspan="2">Enter Date ( YYYY-MM-DD )
<tr>
<td>Date:</td>
<td><input type="text" name="date"></td>
</tr>
<tr>
<td colspan="2" align="center"><input type="submit" name="btnSubmit" value="Change Date"></td>
</tr>
</table>
</form>
EOBODY;
echo $body;
}
?>