in reply to Checking for empty CGI params; this isn't working
However your logic doesn't match your error message - if you want to verify that the user has entered only one of the above you'll want to use && and if you want to make sure that they have entered at least one you'll want to warn when both tele and mobile are empty, i.e. length = 0 (although as pointed out before I would use defined to make sure the values aren't null).if( (length(param('tele')) > 0) || (length(param('mobile')) > 0) ) { }
You probably want to catch that just whitespace isn't being returned too...
|
|---|