Help Community Login/Join:  
We're Playing "Dumbfound the DoGG!"

Join in!

How Do I Create a Web Contact Form To Email Me?



5 replies [Last post]
smartmom's picture
From:
is lost in cyberspace!
smartmom
User is online Online
Moderator (Watching Over The Masses)Joined the Dark SidePremium Member (Gold)I'm a Code Monkey!The Steel CurtainI use FirefoxI use Internet ExplorerI'm Here To Help, & Have Proven It!Linux UserWindows UserA Messiah (Leader of a popular GD Group)I'm a word nerd, read my blog! (5 Blogs)I donated more than $20+ to GeekDrop!I spend all day Photobucketing!Booga Booga BoogaI took a bite of the AppleI'm MagicThe JokerSTaRDoGG <3's you ;)
Joined: 01/15/2009
Posts: 5537
Drops: 7980
Mood: Giggly

Ok here is my stump the dogg question which I hope you really can help me because its not really a bogus question but one that has me banging my head against the wall.

So I am the webmaster for my office website and have been for the last few years.  Ok my one contact form on it when they fill out the info it takes them to a page on the webhosting site that says this:

The following form submission was sent.
Name: test5
E-Mail: test5
Phone: test5
Subject: test5
Comments/Questions:test5
Submit: Submit
_submit_check: 1

to which then sends me a email with the info mailed out.  Here is the thing after they hit "submit" I would like it to redirect them back to the home page or a page I create that says "thank you for submitting ...yada yada yada" .  So how do I do this?  Is there a way to add a redirect command into the submit button?

Here is my coding for my button:

<td colspan=1 height=33></td>
    <td colspan=4 height=33></td>
    <td colspan=6 rowspan=1 width=83><input name="Submit" type="submit" value="Submit" />
                            <input type="hidden" name="_submit_check" value="1"/>
                        </form>

I'll PM you dogg my web URL - sorry can't post it here (privacy and all).  Help............

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
STaRDoGG's picture
From:
Olympus
STaRDoGG
User is online Online
Head Mucky MuckJoined the Dark SidePremium Member (Gold)I'm a Code Monkey!The Steel CurtainI use FirefoxI use Google ChromeI use Internet ExplorerLinux UserWindows UserI donated to GeekDrop simply because I love it!Booga Booga BoogaI took a bite of the AppleFormer Phrozen Crew MemberI'm MagicThe Dr. put the stem on the apple!The Joker
Joined: 01/14/2009
Posts: 1523
Drops: 1921
Mood: Amused
Re: How do I redirect?

Ok, there are many different ways to create a contact form; they can be made with PHP, CGI, Pearl, ASP, ASP.NET, and other languages, but no matter which one you choose, they all boil down to the same concept; you create a Form, that passes the form fields (whatever the user types into the blank lines) to some code (that's where the PHP, CGI, etc. comes in) and the code then handles the emailing of the info to wherever you want it. The final redirect can be chosen in the code.

Since I don't want to make any assumptions on what is already installed on your host, the easiest way is the oldest way. Most hosts have no problem handling CGI/Perl scripts, so here is a free script, very easy to configure and install, and it has an option in it's configuration (use notepad to open the configuration file, which is the script itself) to enter a page you want the user sent off to once the email has been sent to you. Clicky

There's a readme file that describes exactly how to set it all up, and the options available, as well as showing them on the webpage in that link itself. You'll see an option to redirect:

"Description: If you wish to redirect the user to a different URL, rather than having them see the default response to the fill-out form, you can use this hidden variable to send them to a pre-made HTML page."

There, you can enter your default URL if you want, but it's usually better to give them some sort fo feedback letting them know it was sent succcessfully. You can create your own page to show them saying "Your message has been successfully sent", or however you want to handle it.


Never play leapfrog with a unicorn
smartmom's picture
From:
is lost in cyberspace!
smartmom
User is online Online
Moderator (Watching Over The Masses)Joined the Dark SidePremium Member (Gold)I'm a Code Monkey!The Steel CurtainI use FirefoxI use Internet ExplorerI'm Here To Help, & Have Proven It!Linux UserWindows UserA Messiah (Leader of a popular GD Group)I'm a word nerd, read my blog! (5 Blogs)I donated more than $20+ to GeekDrop!I spend all day Photobucketing!Booga Booga BoogaI took a bite of the AppleI'm MagicThe JokerSTaRDoGG <3's you ;)
Joined: 01/15/2009
Posts: 5537
Drops: 7980
Mood: Giggly
Re: How do I redirect?

Thank ya dogg...........me love you long time.  My brain is to fried tonight to play with it but I will tomorrow.  I agree I would rather do a "your submission was sent...yada yada yada" so they don't send me 15 contacts Smile

STaRDoGG's picture
From:
Olympus
STaRDoGG
User is online Online
Head Mucky MuckJoined the Dark SidePremium Member (Gold)I'm a Code Monkey!The Steel CurtainI use FirefoxI use Google ChromeI use Internet ExplorerLinux UserWindows UserI donated to GeekDrop simply because I love it!Booga Booga BoogaI took a bite of the AppleFormer Phrozen Crew MemberI'm MagicThe Dr. put the stem on the apple!The Joker
Joined: 01/14/2009
Posts: 1523
Drops: 1921
Mood: Amused
Re: How do I redirect?

It's been years since I used that particular script, but that should be the default action once the user submits the form. Once you get it working, you can add a little custom coding to the script if you're feelin' froggy, and use a meta redirect after a pause, to still send them to another page.


Never play leapfrog with a unicorn
missb's picture
missb
User offline. Last seen 18 min 14 sec ago. Offline
Moderator (Watching Over The Masses)Joined the Dark SidePremium Member (Gold)I'm a Code Monkey!The Steel CurtainI use FirefoxI use Internet ExplorerI use SafariI'm Here To Help, & Have Proven It!Windows UserA Messiah (Leader of a popular GD Group)I donated to GeekDrop simply because I love it!I took a bite of the AppleSTaRDoGG <3's you ;)
Joined: 01/16/2009
Posts: 2447
Drops: 2927
Mood: Bewildered
Re: How do I redirect?

SCORE!!! All hail the DoGG Not Worthy Laughing

"...There is nothing that isn't great about you" ~~~~ A Friend
smartmom's picture
From:
is lost in cyberspace!
smartmom
User is online Online
Moderator (Watching Over The Masses)Joined the Dark SidePremium Member (Gold)I'm a Code Monkey!The Steel CurtainI use FirefoxI use Internet ExplorerI'm Here To Help, & Have Proven It!Linux UserWindows UserA Messiah (Leader of a popular GD Group)I'm a word nerd, read my blog! (5 Blogs)I donated more than $20+ to GeekDrop!I spend all day Photobucketing!Booga Booga BoogaI took a bite of the AppleI'm MagicThe JokerSTaRDoGG <3's you ;)
Joined: 01/15/2009
Posts: 5537
Drops: 7980
Mood: Giggly
Re: How Do I Create a Web Contact Form To Email Me?

I am soooooooooooooo doing the happy dance I got my page to work and it redirects you to a nice Thank you page when done Big Grin

THANk YOU DOGG!!!!!!!!!!!!!!!!!!

All contents ©Copyright GeekDrop 2009-2010