develooper Front page | perl.beginners | Postings from March 2002

RE: script was working now doesn't

From:
Scot Robnett
Date:
March 19, 2002 14:22
Subject:
RE: script was working now doesn't
Message ID:
LCEGKKCPFPPKKIJKBJBHGEJPDPAA.scot@insiteful.tv
What's the error message? If it is printing your error message as shown
below, then it doesn't think $form is defined. I don't see anything that
leads up to this section, but are you initiating a new object? $form will
return false unless

	$q = new CGI;

and the form actually contains a param named "contactform".

Scot Robnett
inSite Internet Solutions
scot@insiteful.tv



-----Original Message-----
From: Teresa Raymond [mailto:traymond@mariposanet.com]
Sent: Tuesday, March 19, 2002 2:31 PM
To: beginners-cgi@perl.org
Subject: script was working now doesn't


The following script was working last night.  But now only puts up my
error msg.  It was putting up the error msg when I tried to run the
script via file path
(http://www.mariposanet.com/cgi-bin/contactnn.cgi) and continuing to
run the rest of the program if not.  No longer...

Any thoughts?

my $form=$q->param('contactform');

#CHECK FOR FORM
unless (-e $form)
   {print <<"PrintTag";
<html>
<head>
<title>Error!</title>
<STYLE type="text/css">
<!--
BODY {
background-color: #ffffcc;
font-size: 12pt;
color: #000066;
text-align: center
}
H1 {
font-size: 14pt
}
-->
</STYLE>
</head>
<body bgcolor="#ffffff">
<center>
<h2>Alert!</h2>
<h3>I'm sorry but you are forbidden to run this program without
filling out the form.</h3>
<p><a href="http://www.mariposanet.com/contactnn.html">Contact Form</a></p>
</center>
</body>
</html>
PrintTag
exit(0);
}


--
-------------------------------
-  Teresa Raymond             -
-  Mariposa Net               -
-  http://www.mariposanet.com -
-------------------------------

--
To unsubscribe, e-mail: beginners-cgi-unsubscribe@perl.org
For additional commands, e-mail: beginners-cgi-help@perl.org


---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.333 / Virus Database: 187 - Release Date: 3/8/2002

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.333 / Virus Database: 187 - Release Date: 3/8/2002




nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About