Forum Home
Press F1
 
Thread ID: 50800 2004-11-02 03:01:00 Does any one here know CGI/Perl? (ASAP) stu120404 (268) Press F1
Post ID Timestamp Content User
286950 2004-11-04 09:07:00 > Well, you missed the deadline Stu, what are the
> implications?

Not much, I just what this to work so we don’t have to worry about the cgi script that the hosts give us, since it is doggy as hell!

> And is it still important to fix? Or a "Now or never"
> kind of thing.

Yeath it is important to fix or at lest try & fix

> Start with the line you suggested in your first post.
> Or have you already tried that?

All ready have tried that after I made this post.
stu120404 (268)
286951 2004-11-04 09:52:00 www.scriptarchive.com

Go here get it, it's free, and instructions on the site
Rob99 (151)
286952 2004-11-04 10:44:00 I don't even know if Perl supports If...Then statements, but usually they go along the lines of:
If variable=first value
Then "print this statement"
Else If variable=second value
Then "print this statement instead"
You can do this as many times as is necessary, and even add a catch-all line at the end:
Else "some error occured"
Do a Google search for the specifics of how to do this in Perl. There's what looks like a simple guide here (webassign.net).
agent (30)
286953 2004-11-08 09:45:00 bump for stu george12 (7)
286954 2004-11-08 09:55:00 > bump for stu

moron
whtafo (156)
286955 2004-11-08 09:58:00 I dont give a sh*t if people say I try to moderate - that was uncalled for WTF. george12 (7)
286956 2004-11-08 10:21:00 > I dont give a sh*t if people say I try to moderate -
> that was uncalled for WTF.

I stand by it.
whtafo (156)
286957 2004-11-08 19:09:00 sorry I didn't see this thread earlier but a good place to start with PERL is
http://www.perlmonks.org
southern_jas (4017)
286958 2004-11-14 16:16:00 Hey Stu,

How'd you get along with this,

you are probably not using the CGI module, that would be required if you wanted to use param(); It would also probably be suited for what you wanted to do as well as being efficient, robust and secure.

Checkboxes return either no value (NULL) or the value specified, if checked. They would show up in the query_string as name=value.

Just add

use CGI qw/:standard/;

to your script, then add to

if(param('offerforsecurity')
{
$offer = em(join(", ", param('offerforsecurity')));
}
print MAIL "Offer For Security: $offer\n\n";

basically what this does is checks whether anything was parsed in the name of offerforsecurity, if so, it then stores what was parsed seperated by a comma, e.g. Car, Home, etc.


Kame
Kame (312)
286959 2004-11-15 00:17:00 Whoops,

noticed a mistake

if(param('offerforsecurity') should be if(param('offerforsecurity')) forgot to close the parenthesis off.

Other than that I can't see anything else wrong with it.

Cheers,


Kame
Kame (312)
1 2 3 4