|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Hi,
I'm totally new in this stuff, i just started with perl. I know how to set up some basic script and stuff, but that's it. I'm from the netherlands, so don't blame me on my bad english. I want to make an html form that sends an email back depending on the age. Example: for age 8-14 send email 1 for age 15-23 send email 2 etc.. Is there a script somewhere what is able to do such things, or is there anybody who can help me? Matthijs [This message has been edited by matthijs (edited 10-29-99).] |
|
#2
|
|||
|
|||
|
OK here's a basic outline of how to do it,
I'm presuming you have the ages, email adresses and cgi-access of course URL if ($age <= 14) { open MAIL, "|mail $emailaddress" or die $!; print MAIL "You're to young to see the movie"; close MAIL or die $!; } else { open MAIL "|mail $emailaddress" or die $!; print MAIL "You can see the movie"; close MAIL or die $!; } ........... And that's basically it. You can treat the 'mail' program as you would a file handle. Just don't forget to insert the pipe. |
![]() |
| Viewing: Dev Shed Forums > Programming Languages > Perl Programming > Respond email that dpends on age...help |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|