1. No Profile Picture
    Devshed Newbie (0 - 499 posts)
    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


    Is there a script somewhere what is able to do such things, or is there anybody who can help me?

  2. #2
  3. No Profile Picture
    Devshed Newbie (0 - 499 posts)
    Working with forms in PHP - each form element has a name, and that name corresponds to a variable in PHP3.

    So write your form, including a spot for AGE, and set the form action to be a PHP script.

    In the PHP script, do a simple if construct:

    if (($age > 7) AND ($age < 15))
    mail($address, $subject, $body1);
    elseif (($age > 14) AND ($age < 24))
    mail ($address, $subject, $body2);

    And you can continue on like that...

Similar Threads

  1. FreeBSD help for a newb
    By matteorr in forum BSD Help
    Replies: 18
    Last Post: April 20th, 2004, 10:16 AM
  2. sending email + multiple attachments using php
    By gbow in forum PHP Development
    Replies: 6
    Last Post: February 13th, 2004, 09:31 AM
  3. It's all about showing img in email client
    By ovisopa in forum HTML Programming
    Replies: 5
    Last Post: December 16th, 2003, 02:52 AM
  4. email problems.
    By darkane in forum PHP Development
    Replies: 4
    Last Post: November 20th, 2003, 09:25 PM
  5. Replies: 2
    Last Post: November 5th, 2003, 03:18 PM

IMN logo majestic logo threadwatch logo seochat tools logo