I have a form that contains a date picker. The date picker works fine, but when I want to submit its value to the PHP script it, doesn’t show. Here is the relevant part of my HTML code:
<body>
<form action="sub.php" method="post">
<h2>JsDatePick's Javascript Calendar usage example</h2>
Look at the comments on the HTML source to fully understand how this very simple example works.
<input type="text" size="12" id="inputField" name="inputField" />
<input type="submit" value="submit">
</form>
</body>
And I want to pick the date value from inputField in this script:
<?php
echo $date=$_POST['inputField'];
?>
So can you guys tell me how can I get this value from the HTML to the PHP script? I did not show the code of the date picker because that works fine. Thanks in advance.
1 Answer