I am trying to get a multi page from to hook up to a database, it creates the table for entries fine. When you connect the form to the datbase I get the following error;
"Parse error: parse error, expecting `T_VARIABLE' in C:\wamp\www\ratcliffes15\components\com_chronocontact\chronocontact.php(53) : eval()'d code on line 77"
I'm guessing its something to do with the autogenterated code but I not sure how this should work the auto-gen code is set to the following;
"Parse error: parse error, expecting `T_VARIABLE' in C:\wamp\www\ratcliffes15\components\com_chronocontact\chronocontact.php(53) : eval()'d code on line 77"
I'm guessing its something to do with the autogenterated code but I not sure how this should work the auto-gen code is set to the following;
<?php
$MyForm =& CFChronoForm::getInstance("direct_commgit");
if($MyForm->formparams("dbconnection") == "Yes"){
$user = JFactory::getUser();
$row =& JTable::getInstance("chronoforms_direct_commgit", "Table");
srand((double)microtime()*10000);
$inum = "I" . substr(base64_encode(md5(rand())), 0, 16).md5(uniqid(mt_rand(), true));
JRequest::setVar( "recordtime", JRequest::getVar( "recordtime", date("Y-m-d")." - ".date("H:i:s"), "post", "string", "" ));
JRequest::setVar( "ipaddress", JRequest::getVar( "ipaddress", $_SERVER["REMOTE_ADDR"], "post", "string", "" ));
JRequest::setVar( "uid", JRequest::getVar( "uid", $inum, "post", "string", "" ));
JRequest::setVar( "cf_user_id", JRequest::getVar( "cf_user_id", $user->id, "post", "int", "" ));
$post = JRequest::get( "post" , JREQUEST_ALLOWRAW );
if (!$row->bind( $post )) {
JError::raiseWarning(100, $row->getError());
}
if (!$row->store()) {
JError::raiseWarning(100, $row->getError());
}
$MyForm->tablerow["jos_chronoforms_direct_commgit"] = $row;
}
?>