Thanks ... please use the [noparse]
[/noparse] tags when posting your code (it's helpful).
Did you take NogDog's advice and put a NAME attribute in the HTML "input" tag?
Also, with the code you've shown, there must be a value with the name "submit" set in the POST array in order for your code to process.
<form action="date.php" method="post">
Date: <!--note the NAME attribute that has been added to the next tag-->
<input name="date" type="Text" id="date" maxlength="25" size="25">
<a href="javascript:NewCal('demo1','ddmmmyyyy',true,24)"><img src="images/cal.gif" width="16" height="16" border="0" alt="Date"></a>
<!--You also need a "submit"-->
<input type='submit' name='submit' value="Use This Date">
</form>