Hello ,
i meet stuff to delete record on list with chronoforms V4,
i have form which containts DB multi loader the data are displaying in table all rows have two submit link "edit "- "delete".also it containts an other form with input text to create a new record
i'v used hidden fields to edit and modify the record, it works good.
to delete record i'v used this url in the column
del_record is the forms which containts code to delete:
please explain how should i do .
i want to pass the cf_id from the url to del_record
is the url correct?
best regards
latifa
i meet stuff to delete record on list with chronoforms V4,
i have form which containts DB multi loader the data are displaying in table all rows have two submit link "edit "- "delete".also it containts an other form with input text to create a new record
i'v used hidden fields to edit and modify the record, it works good.
to delete record i'v used this url in the column
<td style="border-bottom:1px solid #CCCCCC;">
<a href="index.php?option=com_chronoforms&task=del_record&cf_id=<?php echo $etat['cf_id'];?>">delete</a>
</td>
del_record is the forms which containts code to delete:
<?php
$task = JRequest::getString('task', '', 'get');
if ( $task = 'del_record' ) {
$cf_id = = JRequest::getInt('cf_id', '', 'get');
if ( $cf_id 0 {
$db =& JFactory::getDBO();
$query = "
DELETE
FROM `perso_etat_commande`
WHERE `cf_id` = '{$cf_id}' ;
";
$db->setQuery($query);
$db->query();
}
}
$mainframe =& JFactory::getApplication();
$mainframe->redirect('index.php');
?>
please explain how should i do .
i want to pass the cf_id from the url to del_record
is the url correct?
best regards
latifa