Forums

Inserting Form data into database

pinixdes 29 Nov, 2011
Hello -

I have created a two forms using chronoforms. The first form basically gathers user information. The second form will add items to a different table but uses one field from the first form.

So my question is: how can I save the field with the data populated from another table into the new table.

I need the shower host name entered in the first form to show up in a dropdown in the second form. Which i got that working successfully.

Now I need the name selected from the dropdown in the second form to be saved in the second table.

I have something like this but of course it's not working...please help



<?php

$db = JFactory::getDBO();
global $database;
$hostname->shower_host = $host
$database->(#__chronoforms_new_add_items_form, $hostname);
?>
GreyHead 30 Nov, 2011
Hi pinixdes,

Which version of ChronoForms are you using? You can find the version from Site Admin | Extensions | Install/Uninstall | Components in Joomla! 1.5 or Site Admin | Extensions | Extension Manager | Manage in Joomla! 1.6.

You can use the DB Connection in CFv3 or the DB Save action in CFv4 to save data to a database table.

Bob
This topic is locked and no more replies can be posted.