Hi,
I feel for my English but it is distressing that this is a translation from Google, because I'm not very good with the language.
I have Chrono Forms 3.1, and I have a form to select a value generated by another table, code:
All this within HTML Form, it works and I am generating the dropdown and now comes my question. Within server side validation, but I want to modify another table with reference to the selected value of dropdown. That is, my question is how to get the selected value (which does not modify any table) to references in the query?
The Server side validation code is:
Thanks!
I feel for my English but it is distressing that this is a translation from Google, because I'm not very good with the language.
I have Chrono Forms 3.1, and I have a form to select a value generated by another table, code:
<select class="cf_inputbox validate-selection" id="select_0" size="1" title="" name="select_0">
<option value="">Choose Option</option>
<?php
jimport ( 'joomla.database.database');
$db =& JFactory::getDBO();
$query = "SELECT name FROM jos_chronoforms_pruebaRegistro";
$db->setQuery($query);
$rows = $db->loadObjectList();
foreach ($rows as $row){
?><option value="<? echo $row->name?>"> <? echo $row->name ?> </option> <? }
?></select>
All this within HTML Form, it works and I am generating the dropdown and now comes my question. Within server side validation, but I want to modify another table with reference to the selected value of dropdown. That is, my question is how to get the selected value (which does not modify any table) to references in the query?
The Server side validation code is:
<?php
jimport ( 'joomla.database.database');
$db =& JFactory::getDBO();
$param = ??????????????????;
$query = "UPDATE jos_chronoforms_pruebaRegistro SET activo = '1' WHERE name = ".$param."";
$db->setQuery($query);
$db->query();
?>
Thanks!