Current location: Hot Scripts Forums » General Community » Script Requests » [SOLVED] Make Submit Button Send An E-mail! HELP NEEDED!

[SOLVED] Make Submit Button Send An E-mail! HELP NEEDED!

Reply
  #1 (permalink)  
Old
Newbie Coder
 
Join Date: Mar 2008
Posts: 34
Thanks: 0
Thanked 0 Times in 0 Posts
Question [SOLVED] Make Submit Button Send An E-mail! HELP NEEDED!

Hey All!
I am using Dreamweaver CS3 and created an e-mail form. Now I need to make that when a person clicks the submit button, the e-mail would be sent to my e-mail. I need a PHP script that would send the filled out form to me when the submit button is clicked! This is similar to what I need: http://southside-auto.com/feedback.html

I need it for this website that I made in the contact location.
Here's the website: http://www.apcarsales.com

Please if someone could give me the PHP code I would be very thankful!

This is the code form the form that I have:
HTML Code:
<form action="" method="post" name="Contact Form" id="form1" onsubmit="MM_validateForm('Name','','R','E-mail','','R','Phone','','R','Message','','R')return document.MM_returnValue" encytype="text/plain">
  <label>Name:
  <input name="Name" type="text" id="Name" size="25" />
  </label>
  <p>
    <label>E-mail:
    <input name="E-mail" type="text" id="E-mail" size="25" />
    </label>
  </p>
  <p>
    <label>Phone:
    <input name="Phone" type="text" id="Phone" size="25" />
    </label>
  </p>
  <p>
    <label>Message:<br />
    <textarea name="Message" cols="35" rows="7" id="Message"></textarea>
    </label>
  </p>
  <p>
    <label>
    <input name="Submit" type="submit" id="Submit" value="Submit" />
    </label>
  </p>
</form>

Thanks a lot all!
Reply With Quote
  #2 (permalink)  
Old
Nico's Avatar
Community Leader
 
Join Date: Sep 2005
Location: Spain
Posts: 8,129
Thanks: 12
Thanked 93 Times in 89 Posts
Thread moved to Script requests section.
Reply With Quote
  #3 (permalink)  
Old
blinn_shade's Avatar
Aspiring Coder
 
Join Date: Aug 2007
Posts: 540
Thanks: 0
Thanked 0 Times in 0 Posts
Have you tried http://www.hotscripts.com ?
__________________
Can you think outside the box but remain inside the box?
Reply With Quote
  #4 (permalink)  
Old
Newbie Coder
 
Join Date: Mar 2008
Posts: 34
Thanks: 0
Thanked 0 Times in 0 Posts
I am new to all of this! And have no idea where to go. I checked hotscripts.com but I couldn't find anything!
Reply With Quote
  #5 (permalink)  
Old
Jay6390's Avatar
Code Master
 
Join Date: Apr 2007
Location: United Kingdom
Posts: 1,330
Thanks: 0
Thanked 0 Times in 0 Posts
Since it's a commercial project, and someone is doing the coding for you I highly doubt anyone would do this code for nothing
__________________
Useful Tutorials
[ PHP Video-1-2-3 ] [ MySQL 1-2-3 ]
For any php function reference type

www.php.net/FunctionName
Reply With Quote
  #6 (permalink)  
Old
Newbie Coder
 
Join Date: Mar 2008
Posts: 34
Thanks: 0
Thanked 0 Times in 0 Posts
I know it's not that hard! It's something really similar to this

HTML Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:exslt="http://exslt.org/common" xmlns:edyn="http://exslt.org/dynamic" xmlns:estr="http://exslt.org/strings" xmlns:admin="http://www.schlund.de/tinc/admin" xmlns:guest="http://www.schlund.de/tinc/guest" xmlns:menu="http://www.schlund.de/tinc/menu" xmlns:gen="http://www.schlund.de/tinc/general" xmlns:var="http://www.schlund.de/tinc/variables" xmlns:cpn="http://www.schlund.de/tinc/components" xmlns:dyn="http://www.schlund.de/tinc/dynpages" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:pmtns="http://schemas.schlund.de/pmt">
<head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><link href="http://www.decisionfacilitation.com/spicons/tinc/oaoconfig_us/newsletter/style/index.css" rel="stylesheet" type="text/css" /></head>
<body>
<form action="http://www.decisionfacilitation.com/tinc" method="post" accept-charset="utf-8">
<input type="hidden" name="try" value="true" />
<input type="hidden" name="RegistrationFormID" value="19678" />
<div class="box">
<input type="hidden" name="key" value="YrUz9HAQ" />
<h1>Subscribe</h1>
<table cellpadding="2" cellspacing="1">
<tr class="message"><td colspan="2"><div>Please make sure all fields are filled in. Those marked with a star are mandatory.</div></td></tr>
<tr class="high  mandatory"><td class="title">
    E-mail:
  <strong> *</strong></td><td><input type="text" name="EMail" class="text" size="15" value="" /></td></tr>
<tr class="low"><td class="title">
    First name:
  </td><td><input type="text" name="FirstName" class="text" size="15" value="" /></td></tr>
<tr class="high"><td class="title">
    Last name:
  </td><td><input type="text" name="Name" class="text" size="15" value="" /></td></tr>
<tr style="vertical-align:bottom"><td style="text-align:left"><a href="http://www.decisionfacilitation.com/tinc?key=CK8DcT9i&amp;RegistrationFormID=19678">Unsubscribe</a></td><td colspan="2"><input type="submit" class="submit" style="float:right" value="Subscribe" /></td></tr>
</table></div></form>
</body>
</html>
Reply With Quote
  #7 (permalink)  
Old
Jay6390's Avatar
Code Master
 
Join Date: Apr 2007
Location: United Kingdom
Posts: 1,330
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by IZasPIE View Post
I know it's not that hard! It's something really similar to this
If it was similar to that, there might actually be some php code in that code that's all html
php is the backend of it and it may not be hard, but people wont just write you code for nothing. people dont mind helping with code thats not working properly
__________________
Useful Tutorials
[ PHP Video-1-2-3 ] [ MySQL 1-2-3 ]
For any php function reference type

www.php.net/FunctionName
Reply With Quote
  #8 (permalink)  
Old
Newbie Coder
 
Join Date: Mar 2008
Posts: 34
Thanks: 0
Thanked 0 Times in 0 Posts
Whoops sorry wrong code. Gotta find one that was from this site and is really similar to the one I need!
Reply With Quote
  #9 (permalink)  
Old
Newbie Coder
 
Join Date: Mar 2008
Posts: 34
Thanks: 0
Thanked 0 Times in 0 Posts
Ok would this php script work?
PHP Code:

<?php
$fname 
$_REQUEST['fname'];
$lname $_REQUEST['lname'];
$phone $_REQUEST['phone'];
$uname $_REQUEST['uname'];
$pass $_REQUEST['pass'];
$com $_REQUEST['com'];

/*Sending Email*/

$to "someone@gmail.com";
$subject "Your project";
$message "
Form1 Information
Firstname = 
$fname
Lastname = 
$lname
phone number = 
$phone
Username = 
$uname
password = 
$pass
comments = 
$com";
$from "$fname $lname";


if(
mail($to$subject$message"From: $from"))
echo 
"Mail sent";
else
echo 
"Mail send failure - message not sent";
?>
I can't get it to work!

Last edited by Nico; 03-17-08 at 06:35 PM.
Reply With Quote
  #10 (permalink)  
Old
Jay6390's Avatar
Code Master
 
Join Date: Apr 2007
Location: United Kingdom
Posts: 1,330
Thanks: 0
Thanked 0 Times in 0 Posts
Yes it will work. you replace the $_REQUEST's with the field names of your form, and then send the right bits to the email
__________________
Useful Tutorials
[ PHP Video-1-2-3 ] [ MySQL 1-2-3 ]
For any php function reference type

www.php.net/FunctionName
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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 Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Submit button....can it send info to my email w/out the use of php???? lisa33 HTML/XHTML/XML 7 10-17-06 11:46 AM
Submit button as image with PHP processing ivory_kitten JavaScript 8 10-13-06 10:16 PM
how to make button more attractive mathfxr HTML/XHTML/XML 1 01-12-06 04:29 PM
Submit form automatically - not the submit button INTEL JavaScript 12 12-07-05 06:09 AM
Image button as a submit button badilcan JavaScript 2 07-31-05 08:41 AM


All times are GMT -5. The time now is 05:08 PM.
vBulletin® Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.