View Full Version : script to send e-mail AND redirect to new webpage
Eugene7
03-07-2010, 03:42 PM
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?
bluewalrus
03-07-2010, 04:01 PM
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?
Eugene7
03-07-2010, 04:17 PM
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...
djr33
03-07-2010, 07:21 PM
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.
Eugene7
03-10-2010, 10:15 AM
Got it to work with FormMail - thanks for all the help!
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.