I have a page that has a javascript
date picker, the result of which goes into an input box on an HTML form (see image below). This works fine.
I would also like the chosen date to be stored in as session variable
. Can anyone point to how I should do this? Can a session variable
be assigned within javascript
?
Code so far:
<?php
session_start();
Datepicker
....
<script type="text/javascript">
window.onload = function(){
g_globalObject1 = new JsDatePick({
useMode:2,
target:"inputFieldStart",
dateFormat:"%Y-%m-%d",
cellColorScheme:"armygreen"
});
};
</script>
HTML Form
<form action="https://website" method="Post">
<input name="StartDate" type="text" id="inputFieldStart">
<input type="Submit" value="Update" class="button">
</form>