Parsing the time or date to a database
Opened this issue · 0 comments
antistandard commented
Hello,
This script works well, however, is there a way to pass the time from a form to a mysql database?
This is my form field:
<form method="post" action="newUser.php"> etc..
<li><label for="Testing Time">Testing Time</label> <input type="text" id="time" data-format="h:mm a" data-template="hh : mm a" value="0:00 pm" name="testTime" /></li>
Then
in the newUser.php file I have:
$testTime = filter_var($_POST["testTime"], FILTER_SANITIZE_STRING);
but when I echo out the testTime variable it is empty. All my other fields are populating their variables except passing the time gives me empty results.
Is there a reason why the name on the form is not holding the Combodate text as it passes fromthe form to the php file?
Thank you