Hello people;
pulling my hair out on the simplest thing... I made multiple forms with Chronoforms, yet I can't seem to get this right:
on Preview tab I have a custom code field:
and in the OnLoad I have a query (tested with phpmyadmin! -> result returns 1)
What am I doing wrong?? :-(
Thanks for any feedback
C
pulling my hair out on the simplest thing... I made multiple forms with Chronoforms, yet I can't seem to get this right:
on Preview tab I have a custom code field:
<p><?php echo $dbstatus; ?></p>for debug even added
<p><?php echo $dbcount; ?></p>and
<p><?php echo $dbfree; ?></p>
and in the OnLoad I have a query (tested with phpmyadmin! -> result returns 1)
<?Yet on the form page none of the three values want to show!
$db123 = &JFactory::getDBO();
$query123 = "
SELECT COUNT(*) FROM `#__chronoforms_data_movienight020518`;
";
$db123->setQuery($query123);
$dbcount = $db123->loadResult();
$dbfree = 200-$dbcount;
if ($dbfree >50 ) {
$dbstatus = 'some text';
}
elseif ($dbfree >0 AND <50 ) {
$dbstatus = 'some other text';
}
else {
$dbstatus = 'alternative text';
}
?>
What am I doing wrong?? :-(
Thanks for any feedback
C