Parse erorr not sure what is going on

ctecha 04 Oct, 2010
Hi guys,

Had my form working just fine and then all of a sudden this parse error came up.

Parse error: syntax error, unexpected '/', expecting ',' or ';' in /home/public_html/components/com_chronocontact/chronocontact.php(53) : eval()'d code on line 22

Never saw the error before and the form was working fine. Any idea what this is coming up?

thanks
GreyHead 04 Oct, 2010
Hi ctecha,

You probably have a slash '/' in one of your input names or database column names. Slashes give ChronoForms and MySQL problems. Please rename the input using only [a-z], [A-Z], [0-9] or underscore '_'. No slashes, dashes, spaces or other special characters.

Bob

PS You need to refresh the DB Connection after any changes to database column names. In the Form Editor click the DB Connection tab and set the Connection to 'No'. Click the 'Apply icon in the toolbar to save the form, open the DB Connection tab, set the Connection back to 'Yes' and re-save the form. This will refresh the copy of the table information that ChronoForms uses.
ctecha 04 Oct, 2010
Thanks for your reply. I did what you said with refreshing the db table as well as looking through the input names. I tried both but the parse error still comes up. Is there anything else that could cause this to happen suddenly?
GreyHead 04 Oct, 2010
Hi ctecha,

Unlikely - it's an error generated in the Autogenerated Code so it's a failure of the database save. We usually see that with a dash '-' in an input name.

Please post a link to the form so we can take a quick look.

Bob
GreyHead 04 Oct, 2010
Hi ctecha ,

The Pregnant/Nursing radio button group has / in the name and the PCF Ration Goal text boxes have % in the name - both of these will cause problems.

Bob
ctecha 04 Oct, 2010
Hi Bob,

I actually noticed these when I looked at the form. I did change those and report the form but it still showed the error. The form you're looking at is the original but I did change those so there weren't special characters in the name fields.
GreyHead 04 Oct, 2010
Hi ctecha,

Please don't waste my time by posting links to the wrong form!!

That form is still uncorrected. If there is another version somewhere that you have fixed please post a link to that.

I'm 99% sure that this is the cause of your problems. You need to fix the input name, change the column names to match and refresh the database.

Bob
ctecha 05 Oct, 2010
Hi Bob,

Sorry about that I should have posted the one that was modified. I tried what you said again with changing those form names and I deleted the old db table and created a new one. It looks like the problem is solved now because the parse error went away. Thanks a lot for your help
GreyHead 05 Oct, 2010
Hi ctecha,

Apologies for the !! . . . it gets very frustrating to spend time looking at a form and then finding that it's not the right one :-(

Great to hear that it's working now :-)

Bob
ctecha 05 Oct, 2010
i understand thats no problem.. thanks for taking the time to look at the form for me i appreciate it
This topic is locked and no more replies can be posted.