Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

HTML Forum


You are currently viewing our HTML Forum as a guest. Please register to participate.
Login



Post a Project »

Find a Professional HTML Freelancer!

Find a Freelancer to help you with your HTML projects

FREE Outsourcing eBook!

Reply
Best Way To Send Form?
Old 11-26-2008, 01:25 PM Best Way To Send Form?
Skilled Talker

Posts: 55
Name: Mike
Trades: 0
Hi,
I'm wondering what's the best way to send a form. I have to do it, but should I make it so it sends all the form details to a table in MySQL or my email? Which would you recommend?
HWolfpack6 is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 11-26-2008, 01:46 PM Re: Best Way To Send Form?
Average Talker

Posts: 19
Trades: 0
It really depends on what you're going to do with the data.

If all you want for example is a basic enquiry form where they can leave their telephone number or email so you can get back to them then an email would probably be most suitable as this is the easier method to set up.

If however, you're looking for something more complex and want to filter, log any of the information gathered; then I would suggest a database. This way, you can quickly and easily gather information such as how many leads in a given month or how many leads in a specific area, etc.
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
Limotek is offline
Reply With Quote
View Public Profile Visit Limotek's homepage!
 
Old 11-26-2008, 02:03 PM Re: Best Way To Send Form?
Skilled Talker

Posts: 55
Name: Mike
Trades: 0
Quote:
Originally Posted by Limotek View Post
It really depends on what you're going to do with the data.

If all you want for example is a basic enquiry form where they can leave their telephone number or email so you can get back to them then an email would probably be most suitable as this is the easier method to set up.

If however, you're looking for something more complex and want to filter, log any of the information gathered; then I would suggest a database. This way, you can quickly and easily gather information such as how many leads in a given month or how many leads in a specific area, etc.
OK, I just want the enquiry. But I have already tried: action="mailto:Myemail@email.com". And if they don't use outlook explorer/thunderbird/etc..., then it won't send. I just want it to automatically send to my email.
HWolfpack6 is offline
Reply With Quote
View Public Profile
 
Old 11-26-2008, 06:27 PM Re: Best Way To Send Form?
alysha's Avatar
Extreme Talker

Posts: 208
Name: alysha
Trades: 0
For me the best way is to send the data to your email.
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE

alysha is offline
Reply With Quote
View Public Profile
 
Old 11-26-2008, 06:29 PM Re: Best Way To Send Form?
Skilled Talker

Posts: 55
Name: Mike
Trades: 0
So how would I set it up so that when they press submit, that automatically happens?
HWolfpack6 is offline
Reply With Quote
View Public Profile
 
Old 11-26-2008, 06:52 PM Re: Best Way To Send Form?
racer x's Avatar
Ultra Talker

Posts: 457
Name: Randy
Location: Northern Wisconsin
Trades: 0
To get around using the mailto you can use a php mail function. You don't really need to know php to use it, there are plenty of cut and paste forms out there. It basically works like this:
1. The client fills out the form.
2. The form is sent to a php page(like mail.php) where the form is validated.(Do NOT skip this step or you can have SERIOUS email injections from spammers. There is also javascript client side validation.)
3. This php page then sends the email to your specified email account.
Here is one tutorial:
http://www.thesitewizard.com/archive/feedbackphp.shtml
This is page just the basic php form function, be sure to follow ALL steps mentioned in the tutorial.
The cool thing is, once you get this nailed down, you can customize this template for all your sites easily. But do read as much as you can about security issues of php mailing.
Hope this answers your question.
racer x is offline
Reply With Quote
View Public Profile Visit racer x's homepage!
 
Old 11-26-2008, 07:41 PM Re: Best Way To Send Form?
Skilled Talker

Posts: 55
Name: Mike
Trades: 0
Thanks for the help, but I don't think it worked.

PHP Code:
<?php
  $name 
$_REQUEST['name'] ;
  
$email $_REQUEST['email'] ;
  
$maskcolor $_REQUEST['maskcolor'] ;
  
$masktype $_REQUEST['masktype'] ;
  
$highlight $_REQUEST['highlight'] ;
  
$visorcheck $_REQUEST['visorcheck'] ;
  
$rightstripe $_REQUEST['rightstripe'] ;
  
$rightcolor $_REQUEST['rightcolor'] ;
  
$middlestripe $_REQUEST['middlestripe'] ;
  
$middlecolor $_REQUEST['middlecolor'] ;
  
$leftstripe $_REQUEST['leftstripe'] ;
  
$leftcolor $_REQUEST['leftcolor'] ;
  
$decal $_REQUEST['decal'] ;
  
$colorhelmet $_REQUEST['colorhelmet'] ;
  
$base $_REQUEST['base'] ;
  
$logourl $_REQUEST['logourl'] ;
  
$message "$name , $email , $maskcolor , $masktype , $highlight , $visorcheck , $rightstripe , $rightcolor , $middlestripe , $middlecolor , $leftstripe , $leftcolor , $decal , $colorhelmet , $base , $logourl";
  
  
mail"My Email was here""Form Results",
    
$message"From: $email);
  
header"Location: home.html" );
HWolfpack6 is offline
Reply With Quote
View Public Profile
 
Old 11-28-2008, 10:50 AM Re: Best Way To Send Form?
Skilled Talker

Posts: 55
Name: Mike
Trades: 0
Are we allowed to Bump?
HWolfpack6 is offline
Reply With Quote
View Public Profile
 
Old 11-28-2008, 12:01 PM Re: Best Way To Send Form?
racer x's Avatar
Ultra Talker

Posts: 457
Name: Randy
Location: Northern Wisconsin
Trades: 0
Did you close this php page?
?>
I use this all the time, it should work assuming your server has php installed.
I am sure if you search the php section here, you'd get help for a form as well.
racer x is offline
Reply With Quote
View Public Profile Visit racer x's homepage!
 
Old 11-28-2008, 06:38 PM Re: Best Way To Send Form?
Skilled Talker

Posts: 55
Name: Mike
Trades: 0
Yeah, PHP is installed. And yes, it did get closed. I don't know, I'm just so confused at how this works.

PHP Code:
<?php
  $name 
$_REQUEST['name']; 
  
$email $_REQUEST['email'] ;
  
$maskcolor $_REQUEST['maskcolor'] ;
  
$masktype $_REQUEST['masktype'] ;
  
$highlight $_REQUEST['highlight'] ;
  
$visorcheck $_REQUEST['visorcheck'] ;
  
$rightstripe $_REQUEST['rightstripe'] ;
  
$rightcolor $_REQUEST['rightcolor'] ;
  
$middlestripe $_REQUEST['middlestripe'] ;
  
$middlecolor $_REQUEST['middlecolor'] ;
  
$leftstripe $_REQUEST['leftstripe'] ;
  
$leftcolor $_REQUEST['leftcolor'] ;
  
$decal $_REQUEST['decal'] ;
  
$colorhelmet $_REQUEST['colorhelmet'] ;
  
$base $_REQUEST['base'] ;
  
$logourl $_REQUEST['logourl'] ;
  
$message "$name , $email , $maskcolor , $masktype , $highlight , $visorcheck , $rightstripe , $rightcolor , $middlestripe , $middlecolor , $leftstripe , $leftcolor , $decal , $colorhelmet , $base , $logourl";
  
  
mail"**@**.***""Form Results",
    
$message"From: $email);
  
header"Location: index.html" );
?>

Last edited by HWolfpack6; 11-28-2008 at 06:47 PM..
HWolfpack6 is offline
Reply With Quote
View Public Profile
 
Old 11-28-2008, 06:59 PM Re: Best Way To Send Form?
Dakoom's Avatar
Experienced Talker

Posts: 42
Name: Norman
Location: [Italy]
Trades: 0
Did you get a PHP error or what?
__________________
I'm italian, I am learning english.. so, please, if you see any errors in my grammar or spelling, let me know via PM. Danke!

Please login or register to view this content. Registration is FREE
Dakoom is offline
Reply With Quote
View Public Profile Visit Dakoom's homepage!
 
Old 11-28-2008, 07:01 PM Re: Best Way To Send Form?
Skilled Talker

Posts: 55
Name: Mike
Trades: 0
OK here's a good question. Do I need SMTP for this? I'm testing it on my computer for now.
HWolfpack6 is offline
Reply With Quote
View Public Profile
 
Old 11-28-2008, 07:20 PM Re: Best Way To Send Form?
Skilled Talker

Posts: 55
Name: Mike
Trades: 0
PHP Code:
<?php
if(isset($_POST['submit'])) {

$to "MyEmail@whocares.com";
$subject "Form for Helmets";
$name_field $_POST['name'];
$email_field $_POST['email'];
$maskcolor_field $_POST['maskcolor']
$masktype_field $_POST['masktype']
$highlight_field $_POST['highlight']
$visorcheck_field $_POST['visorcheck']
$rightstripe_field $_POST['righstripe']
$rightcolor_field $_POST['rightcolor']
$middlestripe_field $_POST['middlestripe']
$middlecolor_field $_POST['middlecolor']
$leftstripe_field $_POST['leftstripe']
$leftcolor_field $_POST['leftcolor']
$decal_field $_POST['decal']
$colorhelmet_field $_POST['colorhelmet']
$base_field $_POST['base']
$logourl_field $_POST['logourl']
$message  =  $_POST['name']; 
 
$body "From: $name_field\n E-Mail: $email_field\n Message:\n $message";
 
echo 
"Data has been submitted to $to!";
mail($to$subject$body);

} else {

echo 
"blarg!";

}
?>
I don't get it. It just sends the page to the mailer.php when submit is clicked. And then I don't receive any email at all. Is it because I don't have SMTP?
HWolfpack6 is offline
Reply With Quote
View Public Profile
 
Old 11-29-2008, 03:36 PM Re: Best Way To Send Form?
Skilled Talker

Posts: 55
Name: Mike
Trades: 0
Parse error: parse error, unexpected T_VARIABLE in /home/www/footballhelmets.freehostia.com/mailer.php on line 9

EDIT: I got it to submit, but still haven't received the email yet, how long should I give it? It's only text.

Last edited by HWolfpack6; 11-29-2008 at 03:38 PM..
HWolfpack6 is offline
Reply With Quote
View Public Profile
 
Old 11-29-2008, 08:09 PM Re: Best Way To Send Form?
Banned

Posts: 923
Name: Geoff Vader
Location: In my dreams
Trades: 0
Quote:
Originally Posted by alysha View Post
For me the best way is to send the data to your email.
On 1and1 the world's leading host, according to itself, I've seen times where there is bad service, sometimes an email actually doesn't get sent, other times the website hosted there is down.

Also when i compare the access logs of that to the ones of my linux server i note that 1and1 actually loses at least 20% of inbound clicks from the log, who knows what else they lose.

To my annoyance inbound quote requests to the site on 1and1 (the management ignorantly insists) all go as email only - the form is filled and the data is emailed. NO COPY IS KEPT ON THE SERVER - which means if the email is one that gets lost in transit (it happens, i know - we even had a complaint once) no one will ever know!

Back things up always. And always keep copies of submitted form data. Any other way is moronic. Take it from a veteran.
witnesstheday is offline
Reply With Quote
View Public Profile
 
Old 11-29-2008, 08:12 PM Re: Best Way To Send Form?
Banned

Posts: 923
Name: Geoff Vader
Location: In my dreams
Trades: 0
Quote:
Originally Posted by HWolfpack6 View Post
OK here's a good question. Do I need SMTP for this? I'm testing it on my computer for now.
That's right, you can't normally expect mail-sending scripts (designed to run on your server) to send mail from the desktop of a home computer! Not unless you've got a server inside THAT, and even then, if your ISP hasn't specifically been sanctioned by you to do that, it won't work anyway, server or not.

It's a good thing really, because it's the last defence against people hijacking machines on the sly and using them to send 8 billion spam messages a second.
witnesstheday is offline
Reply With Quote
View Public Profile
 
Old 11-29-2008, 08:41 PM Re: Best Way To Send Form?
Skilled Talker

Posts: 55
Name: Mike
Trades: 0
Darn. My host (freehostia) doesn't let me use SMTP
HWolfpack6 is offline
Reply With Quote
View Public Profile
 
Old 11-29-2008, 09:02 PM Re: Best Way To Send Form?
Banned

Posts: 923
Name: Geoff Vader
Location: In my dreams
Trades: 0
The best things in life may be free, but not on the web! Paid hosting is NOT very expensive. Still, i bet you if you get a free page at lycos, they'll let you use smtp

Last edited by witnesstheday; 11-29-2008 at 09:04 PM.. Reason: removed gratuitous sales pitch
witnesstheday is offline
Reply With Quote
View Public Profile
 
Old 11-29-2008, 09:07 PM Re: Best Way To Send Form?
Skilled Talker

Posts: 55
Name: Mike
Trades: 0
Already signed up for free-hosts.net.

But thanks for your help!
HWolfpack6 is offline
Reply With Quote
View Public Profile
 
Old 11-30-2008, 08:01 AM Re: Best Way To Send Form?
Novice Talker

Posts: 5
Name: Edy Galantzan
Trades: 0
By email it easier to program.
__________________
Edy

Web Pro
edygalantzan is offline
Reply With Quote
View Public Profile Visit edygalantzan's homepage!
 
Reply     « Reply to Best Way To Send Form?

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting 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 Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 3.72743 seconds with 12 queries