Results 1 to 5 of 5

Thread: script to send e-mail AND redirect to new webpage

  1. #1
    Join Date
    Mar 2010
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default script to send e-mail AND redirect to new webpage

    Hi,

    I'm trying to find a way to have customers fill in a form with their e-mail address, with validation for the mail address they have entered, and then have that sent to my own e-mail address, and the customer then be redirected to a new website page to download demo software/pdfs...

    While I write my own website I am not a all a code writer, if you see what I mean... I really am a dunce at this!

    Any ideas - is this possible?

  2. #2
    Join Date
    May 2007
    Location
    Boston,ma
    Posts
    2,127
    Thanks
    173
    Thanked 207 Times in 205 Posts

    Default

    Could do it with php, and javascript for validation or just php can you post your form code? Does your server have php as well?
    Corrections to my coding/thoughts welcome.

  3. #3
    Join Date
    Mar 2010
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Actually, it looks like my hosting service has a clone of Matt Wright's FormMail... So if I can work out how to use that I should be part way there...

    Not at all sure I can work it out, but I'll try...

  4. #4
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    The simple answer to this is that you cannot control the behavior of a "form mailer" if it is on another website. Those to whatever they want and you can't tell them not to. So if you want more control, you need to use a locally hosted form mailer (probably PHP-based).

    Also, if it is an existing script you are using, then just be sure it has all the options you need. It will probably be easier to write your own (because sending emails in PHP is relatively easy) than to try to revise and update an existing script.

    FormMail is probably a good way to start, but don't be too worried about trying to write your own: it's not very difficult once you work out a few details. There are many examples out there also.


    The redirection doesn't actually need to be a "redirect", but instead the action of the form. Forms are like links but submit data also, so the "action" is equivalent to the "href" of a link-- it means "go here and send the data from the form also".
    So on that receiving page parse the form and also then get the other content you want.
    Alternatively you can also do a redirect (reload) if you want. That's a little simpler, probably, but not quite as smooth.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  5. #5
    Join Date
    Mar 2010
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Got it to work with FormMail - thanks for all the help!

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •