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
Old 03-04-2006, 04:10 PM form -> email info
Seanneo's Avatar
Experienced Talker

Posts: 42
Trades: 0
hey im wondering how i can make a <form> email the inputted info to an email address.
any help much appreciated.
Seanneo is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 03-04-2006, 04:20 PM Re: form -> email info
stOx's Avatar
Machine

Latest Blog Post:
Worlds Smallest Car - Peel P50
Posts: 2,111
Name: Matt. (>',')>
Location: London, England.
Trades: 0
with the mail() function in php.
Html has no ability to send an 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
stOx is offline
Reply With Quote
View Public Profile Visit stOx's homepage!
 
Old 03-04-2006, 04:22 PM Re: form -> email info
Seanneo's Avatar
Experienced Talker

Posts: 42
Trades: 0
i have little to no knowledge of php cud u show me with a short example code please, thx
Seanneo is offline
Reply With Quote
View Public Profile
 
Old 03-04-2006, 04:43 PM Re: form -> email info
stOx's Avatar
Machine

Latest Blog Post:
Worlds Smallest Car - Peel P50
Posts: 2,111
Name: Matt. (>',')>
Location: London, England.
Trades: 0
php.net has documentation.
__________________

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
stOx is offline
Reply With Quote
View Public Profile Visit stOx's homepage!
 
Old 03-04-2006, 04:51 PM Re: form -> email info
Seanneo's Avatar
Experienced Talker

Posts: 42
Trades: 0
thx stOx exactly what i needed
Seanneo is offline
Reply With Quote
View Public Profile
 
Old 03-04-2006, 05:23 PM Re: form -> email info
Seanneo's Avatar
Experienced Talker

Posts: 42
Trades: 0
only thing is i cant work it with a html <form> tag. can u shed some light on that?
thx
Seanneo is offline
Reply With Quote
View Public Profile
 
Old 03-05-2006, 02:11 AM Re: form -> email info
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,383
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
You submit the form to a processing page

does it have to be php? usually your questions are ASP/ASP.NET where you can use CDOSYS to send the email.
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 03-05-2006, 04:59 AM Re: form -> email info
Seanneo's Avatar
Experienced Talker

Posts: 42
Trades: 0
no it doesn't, all i want to do is recieve info in the form of an email when someones submits it. please do it in anyway, just dont expect me to understand it all :P
thx
Seanneo is offline
Reply With Quote
View Public Profile
 
Old 03-05-2006, 03:00 PM Re: form -> email info
CobraHosts's Avatar
Skilled Talker

Posts: 95
Location: Florida
Trades: 0
Here is an example of a simple feedback form using an HTML form page and a PHP page to process and mail the information gathered from the HTML fom:

Code:
<HTML>
<HEAD>
<title>Simple Feedback Form</title>
</HEAD>

<BODY>

<FORM METHOD = "POST" ACTION="feedbackform.php" 

<p><strong>Your Name:</strong><br>
<INPUT type="text" NAME="sender_name" SIZE=30></p>

<p><strong>Your E-Mail Address:</strong<br>
<INPUT type="text" NAME="sender_email" SIZE ="30" </p>

<p><strong>Message:</strong><br>
<TEXTAREA NAME="message" COLS=40 ROWS=5 WRAP=virtual></TEXTAREA></p>

<p>INPUT TYPE="submit" NAME="submit" VALUE="Send This Form"></p>

</FORM>
</BODY>
</HTML>
This page should be named "simple_form.html"

Where it says ACTION="" This is where you name the PHP page that will process this form. In this case it's "feedbackform.php"

Everywhere it says NAME="" you can name this whatever you want to. These become the variables that are processed by the PHP form page.

Here is an example of the PHP page that will send the form information to your email.

Code:
<?
if (($_POST[sender_name] == "" ||
    ($_POST[sender_email] == "" ||
    ($_POST[message] == "" )) {
      header("Location: simple_form.html");
      exit;
}

$msg ="Sender's Name:\t$_POST[sender_name]\n";
$msg .= "Sender's E-Mail:\t$_POST[sender_email]\n";
$msg .= "Message:\t$_POST[message]\n";

$to = "you@yourdomain.com";
$subject = "Feedback Form";
$mailheaders = "From: My Web Site <feedback@yourdomain.com>\n";
$mailheaders .= "Reply-To: $_POST[sender_email]\n"

mail ($to, $subject, $msg, $mailheaders);

?>
This page should be named "feedbackform.php"

You can see that the $_POST[] == "" is simply the variables we named in the simple_form.html page. These can be named anything as long as they are the same on both your HTML and PHP pages.

The $msg .="" is the message body of the email you will receive.

The $to ="" is where you want the email sent to.

The $subject ="" whatever you want the subject of your feedback emails to be.

The $mailheaders ="" These variables just add more headers to your email.

The mail () is the command to mail your variable fields to your email.

That should do it!

Hope this helps you!

Last edited by CobraHosts; 03-05-2006 at 03:02 PM..
CobraHosts is offline
Reply With Quote
View Public Profile Visit CobraHosts's homepage!
 
Old 03-05-2006, 04:57 PM Re: form -> email info
Seanneo's Avatar
Experienced Talker

Posts: 42
Trades: 0
thanks a million cobra for your time, much appreciated ill try tomo.
top man
Seanneo is offline
Reply With Quote
View Public Profile
 
Old 03-05-2006, 05:09 PM Re: form -> email info
CobraHosts's Avatar
Skilled Talker

Posts: 95
Location: Florida
Trades: 0
No problem! Hope it helps you out. If you have any more trouble just ask...
CobraHosts is offline
Reply With Quote
View Public Profile Visit CobraHosts's homepage!
 
Reply     « Reply to form -> email info
 

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 0.31511 seconds with 12 queries