Forums

Parse error - reference line does not exist in SS Validation

randallwhiteman 22 Nov, 2010
I am trying to get my first server side validation working with the help of an example on page 112 of ChronoForms 31 for Joomla site Cookbook eBook

I have this code in the Server Side Validation box:

<?php
$title = JRequest::getString('title', '', 'post');
if ( !$title ) {
return "Please enter a Title";
}
?>


Received this error:

Parse error: syntax error, unexpected ')' in /home/xxxxxx/xxxx.xxxxxx.com/components/com_chronocontact/libraries/includes/JSrepublish.php(5) : eval()'d code on line 8


Other threads suggested to check line (8 in this case) of the server side validation code but there are not 8 lines in my code so I'm a bit confused.

Thanks for any help.
Randall.
GreyHead 22 Nov, 2010
Hi Randall,

In this case the error is from Line 8 (or thereabouts) of the Form HTML.

Bob
randallwhiteman 23 Nov, 2010
Thanks Bob, with much trial and error I've got the validation working.

Now, on to the next stumbling block

Cheers,
Randall.
This topic is locked and no more replies can be posted.

VPS & Email Hosting 20% discount
hostinger