Calendar to mysql


#1

Hello,

I am new with DHX components. I have a calender to pick a date and send this to a database. With succes a read the date and set these one as the date in the calendar. Send the new selected date back to the database is not working
This is my code

<?php
include(‘db_script/db_connect.php’);
if($_SERVER[‘REQUEST_METHOD’]==“POST”) {
$SDag = $_POST[‘SDag’];
$sql = “UPDATE tbl_EParameter SET WDag = “.$SDag.” WHERE NrRecord = 1” ;
$con->query($sql) ;
} ;
?>


#2

Hi,

a) be sure that date format is compatible with on of mysql

https://docs.dhtmlx.com/calendar__date_formatting.html

b) which code you are using to send calendar’s value back to server? Be sure to check that $_POST[“SDag”] actually hold some value. If you are using calendar inside a normal HTML form, there is no need for any special steps, the value will be sent to server side through the linked input.