Main
Index
Search
Posts
Who's
Online
Log
In

Home: Products: CMS Builder:
Error in error checking

 

 


Toledoh
Enthusiast

Dec 12, 2011, 12:29 PM

Post #1 of 4 (637 views)
Shortcut
Error in error checking Can't Post

Hi Guys,

If a leave a field blank in this form, I get the error alert, but I also get an error "Notice: Undefined variable: errorsAndAlerts in /home/askmatus/public_html/register.php on line 34 "

Can anyone help?

http://www.askmatusik.com/register.php
Cheers,

Tim Forrest
Toledoh Enterprises
www.toledoh.com.au
Attachments: register.php (5.84 KB)


Toledoh
Enthusiast

Dec 12, 2011, 4:17 PM

Post #2 of 4 (627 views)
Shortcut
Re: [Toledoh] Error in error checking [In reply to] Can't Post

Hi All,

I think the issue is something to do with this;


Code
  $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 Forrest
Toledoh Enterprises
www.toledoh.com.au


Dave
Staff / Moderator


Dec 12, 2011, 7:43 PM

Post #3 of 4 (615 views)
Shortcut
Re: [Toledoh] Error in error checking [In reply to] Can't Post

Hi Tim,

Try replacing $alertsAndErrors with $errorsAndAlerts

Let me know if that works for you.

Dave Edis - Senior Developer
interactivetools.com
 


Toledoh
Enthusiast

Dec 12, 2011, 7:55 PM

Post #4 of 4 (614 views)
Shortcut
Re: [Dave] Error in error checking [In reply to] Can't Post

Duh!

Thanks Dave
Cheers,

Tim Forrest
Toledoh Enterprises
www.toledoh.com.au