Error in error checking

4 posts by 2 authors in: Forums > CMS Builder
Last Post: December 12, 2011   (RSS)

Re: [Toledoh] Error in error checking

Hi All,

I think the issue is something to do with this;

$alertsAndErrors = "";
if (!@$_REQUEST['title']) { $alertsAndErrors .= "Please specify title!<br/>\n"; }
if (!@$_REQUEST['email']) { $errorsAndAlerts .= "You must enter your email!<br/>\n"; }
else if(!isValidEmail(@$_REQUEST['email'])) { $errorsAndAlerts .= "Please enter a valid email (example: user@example.com)<br/>\n"; }
if (!@$_REQUEST['content']) { $alertsAndErrors .= "Please ask your question!<br/>\n"; }


If I remove that check, the site performs fine (but doesn't check the email...)
Cheers,

Tim (toledoh.com.au)

Re: [Toledoh] Error in error checking

By Dave - December 12, 2011

Hi Tim,

Try replacing $alertsAndErrors with $errorsAndAlerts

Let me know if that works for you.
Dave Edis - Senior Developer
interactivetools.com

Re: [Dave] Error in error checking

Duh!

Thanks Dave
Cheers,

Tim (toledoh.com.au)