Forums

Unexpected '$' -- can't store in db!

jebraweb 02 Jan, 2012
Hi there,

I've been using ChronoForms for a while now, but this is the first time I've tried to store form results in the database. I have a pretty straightforward form, nothing dynamic, and no special characters of any kind in any field name. However, when I try to enable the database storage, I get an error on submission of the form. It looks like this:

Parse error: syntax error, unexpected '$', expecting T_VARIABLE in /data/17/2/77/60/2566712/user/2813819/htdocs/administrator/components/com_chronoforms/form_actions/db_save/db_save.php(63) : eval()'d code on line 20

Fatal error: Call to a member function bind() on a non-object in /data/17/2/77/60/2566712/user/2813819/htdocs/administrator/components/com_chronoforms/form_actions/db_save/db_save.php on line 86


I had some $ in the field LABELS, not the field names, and I didn't think they could cause this problem, but just in case I tried deleting them and trying again. It had no effect. The form works fine without the database save enabled (i.e., the form submits, and the email I have set up to send goes through fine).

I'm sure I'm missing something really straightforward, but I'm not much of a serious programmer -- can anyone give me some advice?

Thanks,
Debi
GreyHead 02 Jan, 2012
Hi Debi,

You are right that the Labels shouldn't cause this. It still looks like a problem with an input or column name though :-(

Please take a Form Backup using the icon in the Forms Manager and post it here (as a zipped file) or PM or email it to me and I'll take a closer look.

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