Re: Web Camera

by "Mike Taylor" <lonewolf(at)one.net>

 Date:  Sat, 25 Aug 2001 08:23:58 -0400
 To:  <hwg-techniques(at)hwg.org>
 References:  sportsstuff
  todo: View Thread, Original
You could check to see if the variable set for recipient mail is blank
inside your CGI script, and if it is, fill it with your own email address,
or even skip the entire process of attempting to send mail.  For example,
suppose the variable name for your email form request value is $email:

if ($email eq ""){
  $email eq "youremail(at)yourdomain.com"
}

Not sure if that's correct syntax for perl; I'm sure someone on the list
will correct me if it isn't.

A source you can use is:  http://www.tesol.net/scripts/Class/part1/

I think most of it is a little to rudimentry for your level, but I thought
you'd particularly be interested in part 4 of this online tutorial.

You might want to post this question on hwg-languages if the above doesn't
help you.

Mike

----- Original Message -----
From: "Shawn Sass" <shawn(at)sportsstuff.com>
To: <hwg-techniques(at)hwg.org>
Sent: Thursday, August 23, 2001 6:26 PM
Subject: Re: Web Camera


> Howdy list,
>
> Ok, I've got this CGI script that takes some form data, writes it to a txt
> file, sends a "thank you" email to the user, and returns a page with links
> to the rest of the site.  I'm having a problem that occurs when the user
> leaves the email field blank.  It' still writes the form data to the txt
> file but doesn't know where to send an email to so it writes a server
error
> message to the browser window.
>
> How can I stop the email from trying to be sent if the email field is left
> blank?  I'm using Javascript to check the email before it's sent to the
> script but I don't know what to tell the script to do when there's no
email
> present.  I also don't want to make the user enter an email cause that may
> piss some of them off.
>
> TIA!
>
> _ S h a w n ... .- ... ...
> --. .-. .- .--. .... .. -.-.
> .- .-. - .. ... -
>
>

HWG hwg-techniques mailing list archives, maintained by Webmasters @ IWA