I want to UPDATE the mysql database field from a chronoforms form.
I have puted in the form code the following, to automatically update che DataRisposta field with the today date:
The problem is that no update happens in the database.
Can someone help me ?
Thank you to all.
I have puted in the form code the following, to automatically update che DataRisposta field with the today date:
<p><?php $data = date("Y/m/d");
$db =& JFactory::getDBO();
$query = "
UPDATE '#__chronoforms_Messaggi_Backend'
SET 'DataRisposta' = $data
WHERE 'cf_id' = $selezione
";
echo $query;
$db->setQuery($query);
$db->query();?></p>
The problem is that no update happens in the database.
Can someone help me ?
Thank you to all.