I need your help.
I have ChronoForm with 2 input boxes: Name and Email.
<div class="form_item">
<div class="form_element cf_textbox">
<label class="cf_label">Navn <span class="req">*</span></label>
<input class="cf_inputbox required" maxlength="150" size="30" title="" id="text_0" name="text_0" type="text" />
</div>
<div class="cfclear"> </div>
</div>
<div class="form_item">
<div class="form_element cf_textbox">
<label class="cf_label">Email <span class="req">*</span></label>
<input class="cf_inputbox required validate-email" maxlength="150" size="30" title="" id="email" name="email" type="text" />
</div>
<div class="cfclear"> </div>
</div>
After the button "send" is pressed, I need to send the information inserted into that fields to a Newsletter Component Table DB - AcyMailing or CCNewsletter.
Below is the Table Structure with Name and Email for AcyMailing and CCNewsletter
![](http://img841.imageshack.us/img841/7471/acymailing.th.jpg)
![](http://img17.imageshack.us/img17/5729/ccnewsletter.th.jpg)
I followed ChronoForms saving to a database table.pdf but I am still confused what php code should I use.
In ChronoForms saving to a database table.pdf I found the following code, but how can I addapt that code for taking the information from text input and send and save it into a specific table structure (acymailing and ccnewsletter)
<?php
$data = array();
$data['cf_id'] = 99;
$data['name'] = 'John Smith';
$record =& JTable::getInstance("chronoforms_newsletter_signup", "Table");
if ( !$record->save($data) ) {
JError::raiseWarning(100, $record->getError());
}
if (!class_exists('Tablechronoforms_newsletter_signup')) {
class Tablechronoforms_newsletter_signup extends JTable
{
var $cf_id = null;
var $uid = null;
var $recordtime = null;
var $ipaddress = null;
var $cf_user_id = null;
var $name = null;
var $email = null;
function __construct( &$database ) {
parent::__construct( '#__chronoforms_newsletter_signup', 'cf_id', $database );
}
}
}
?>
I hope somebody can help me.
Thank you in advance!
Regards,
Afanasie