Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > Creating forms and having them sent to you

Creating forms and having them sent to you
Thread Tools
Mac Elite
Join Date: Oct 1999
Location: Naperville, IL
Status: Offline
Reply With Quote
Feb 18, 2006, 08:33 PM
 
Hi, I am trying to make a page where people enter some basic data (I have a template) and need that data sent to me by clicking the submit button. Is this a difficult thing to do? I would like to put it on my .mac account to work for me.

Any suggestions are appreciated. I'm not sure if I just program everything into the one html file or does there need to be multiple files to work with.

Can I do this from within dreamweaver mx? Or do I need a whole new version?

Thanks,
Mike
2009 MacMini 2.0 C2D 4GB (3,1) - Needs update!
11" MBA (2010 1.6GHz C2D)
iPhone 4 / iPad!
Hooked on Apple since the IIGS
     
Senior User
Join Date: Jul 2004
Status: Offline
Reply With Quote
Feb 18, 2006, 08:55 PM
 
If your website allows php create a html page with your fields and such. and in the form have the action point to mailme.php
in the mailme.php would would have something like
[php]
<?php
$msg = "Name: $sender_name \n";
$msg .= "Email: $sender_email \n";
$msg .= "Comments: $message \n";
$to = "youremail@domain.com";
$mailheaders = "From: $sender_email \n";
$mailheaders .= "Reply-To: $sender_email";
mail($to, $subject, $msg, $mailheaders);
echo 'Thank You! Your Message has been sent';
?>[/php]

Of course you can add IF statements to check if the user filled out the fields or not
Now the trick to getting everything they filled out in the html form is to use the name. so if you got.
<INPUT type="text" NAME="OS" VALUE="Operating System" SIZE="30">
you would use the php code to add it into the email
$msg .= "Computer Using: $OS \n";
You shouldn't make fun of nerds... you'll be working for one some day.
     
Mac Elite
Join Date: Aug 2000
Location: Minneapolis, MN
Status: Offline
Reply With Quote
Feb 18, 2006, 09:12 PM
 
Please be careful in preparing a php form for email. They are very easily used to send out SPAM by the tons. The variables used to create the email header such as the recipient and sender can be intercepted and written to another item.

I've had our forms hijacked before, even with some sanity checking in place. Use a script and make sure to keep it up-to-date that has anti-spam code and checking of input to prevent using your form and website as a launching pad for spam.
     
Senior User
Join Date: Jul 2004
Status: Offline
Reply With Quote
Feb 18, 2006, 09:31 PM
 
Originally Posted by bluedog
Please be careful in preparing a php form for email. They are very easily used to send out SPAM by the tons. The variables used to create the email header such as the recipient and sender can be intercepted and written to another item.

I've had our forms hijacked before, even with some sanity checking in place. Use a script and make sure to keep it up-to-date that has anti-spam code and checking of input to prevent using your form and website as a launching pad for spam.
True that. but if you want to stop them from being able to send to someone else through manipulation just do
mail('youremail@domain.com', $subject, $msg, $mailheaders);

This will force it to go to your email and manipulation of it isn't possible for the receiver. Could do this for the whole thing really if you wanted to.
You shouldn't make fun of nerds... you'll be working for one some day.
     
Mac Elite
Join Date: Sep 2003
Location: London
Status: Offline
Reply With Quote
Feb 19, 2006, 04:39 AM
 
I used the built in email thingy in PHP but had to add things into the headers because Spam blockers were stopping the mail. Also needed to be able to upload and send attachments and these messed up - files were corrupted.

So, I found this ready made script/package, it works well.

http://phpmailer.sourceforge.net/
     
Grizzled Veteran
Join Date: Apr 2004
Location: Nagoya, Japan • 日本 名古屋市
Status: Offline
Reply With Quote
Feb 19, 2006, 06:51 AM
 
Chances are your .Mac account can't run any form mailing scripts, PHP or otherwise.

However, there's a free third-party website that will process your forms and e-mail the results for you: Response-O-Matic. I'm using it for one client who uses the free webspace that came with his DSL account.
     
Fresh-Faced Recruit
Join Date: Jun 2006
Location: GA
Status: Offline
Reply With Quote
Jun 29, 2006, 09:37 AM
 
Originally Posted by CaptainHaddock
Chances are your .Mac account can't run any form mailing scripts, PHP or otherwise.

However, there's a free third-party website that will process your forms and e-mail the results for you: Response-O-Matic. I'm using it for one client who uses the free webspace that came with his DSL account.
Just wanted to say thanks for posting that site!...I too am now using the Response-o-matic...Its a great tool..tho I would still like to know how to make my own with GOLive..I have one made..i just dont know how to put it onto my website and make it work...
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 09:30 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2