Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: Re: Checking for empty CGI params; this isn't working

by andrew (Acolyte)
on Jul 14, 2002 at 18:01 UTC ( #181615=note: print w/ replies, xml ) Need Help??


in reply to Re: Checking for empty CGI params; this isn't working
in thread Checking for empty CGI params; this isn't working

syntax error at /var/securewww/virtual/webewebin.com/a/signup.cgi line + 61, near ") {" syntax error at /var/securewww/virtual/webewebin.com/a/signup.cgi line + 76, near "}" (Might be a runaway multi-line ~~ string starting on line 73) Execution of /var/securewww/virtual/webewebin.com/a/signup.cgi aborted + due to compilation errors.
I get that error from
elsif ((length(param('tele') > 0) || (length(param('mobile') > 0)) { error("You need to enter either a telephone or a mobile"); }
</code>


Comment on Re: Re: Checking for empty CGI params; this isn't working
Select or Download Code
Re: Re: Re: Checking for empty CGI params; this isn't working
by little (Curate) on Jul 14, 2002 at 18:07 UTC

    elsif ( (length(param('tele')) > 0) || (length(param('mobile')) > 0) ) { .. }
    you've simply missed a brace each after 'tele' and 'mobile' :-)

    Have a nice day
    All decision is left to your taste

      this is what happens, when I dont enter anything in both I pass, but if I do enter something I get the error, how is it backwords

        So you might want to post a bigger chunk of code and tell us what lines 61 or 76 are?

        Have a nice day
        All decision is left to your taste

        Just to be an ass, if you are getting exactly the opposite results than what you are expecting, negate the expression with an !. For the real solution, I would suggest printing out the values of your variables along with their associated lengths. Also, is there a trailing new-line character. There is something to be said for DIY...

        thor

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://181615]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (5)
As of 2014-08-02 01:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Who would be the most fun to work for?















    Results (53 votes), past polls