I'd like the user to book their appointment through the form. I used the datetimepicker jquery as follows:
<script src="jquery.js"></script>
<script src="jquery.datetimepicker.js"></script>
<script>
$(function() {
jQuery('#DateTime').datetimepicker({
format:'D, d M Y H:i',
});
});
</script>
Previously i used the datepicker and i successfully inserted the data into the table. After changing to datetimepicker jquery and data type as datetime, i faced with a problem on inserting the data. I've tried the solutions but it still failed. My codes are as follows:
if (! $conn)
die("Couldn't connect to MySQL");
$query = "SELECT from Client (Client_ID)";
$sql = "INSERT INTO Appointment (Client_ID,Svc_ID,Appt_DateTime)
VALUES ('$_POST[ClientID]','$_POST[ApptType]','$_POST[DateTime]')";
mysql_query($query,$sql,$conn);
dbDisconnect($conn);