Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
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>

Replies are listed 'Best First'.
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?
[ambrus]: modern computers have way enough processing power to allow this, at least for geeks who are willing to spend a few weeks to learn a tricky new user interface like vim
[Corion]: ambrus: Well, for mathematical notation, I find blackboard much more convenient than a computer. But when inserting text or moving text around, the computer wins obviously
[ambrus]: But either of these is a big problem in practice, so I'd need to spend like thirty years of my life to solve (a) and five more years to solve (b)
[ambrus]: Corion: yes, CURRENTLY the blackboard is more convenient
[ambrus]: and it's not like I want to ban blackboards anyway
[ambrus]: you already have blackboards and a canvas for projector or overhead transparencies (or positive film slide projector, not used for maths) canvas in the same lecture halls today, and switch in a few minutes between presentations,
[ambrus]: they're only difficult to use together.
[ambrus]: overhead transparencies are a nice convenience by the way that mix the two slides, because you can write them in advance and edit them during the presentation easily. but they're not very much in fasion these days.
[ambrus]: you can even print them.
[Discipulus]: ambrus i'm trying out MremoteNG which wrap putty and rdp and many other things..

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (11)
As of 2017-09-26 10:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    During the recent solar eclipse, I:









    Results (293 votes). Check out past polls.

    Notices?