Webmaster Forum

Go Back   Webmaster Forum > Web Development > Coding Forum

Coding Forum Problems with your code? Discuss coding issues, including JavaScript, PHP & MySQL, HTML & CSS, Flash & ActionScript, and more.


Reply
 
LinkBack Thread Tools Display Modes
Old 12-11-2008, 03:22 PM   #1 (permalink)
Contributing Member
 
Join Date: 06-24-08
Posts: 70
iTrader: 0 / 0%
Latest Blog:
None

chuco61 is liked by many
Email form help

Im creating a form and would like it to be sent via email to any email that is typed in a text field (or whatever else might work)

so i fill out the form. the last field is for my email hit submit and the results go to my email or anyone's email that i put in.

suggestions?
chuco61 is offline  
Add Post to del.icio.us
Reply With Quote
Old 12-11-2008, 03:53 PM   #2 (permalink)
Contributing Member
 
Join Date: 06-24-08
Posts: 70
iTrader: 0 / 0%
Latest Blog:
None

chuco61 is liked by many
?
chuco61 is offline  
Add Post to del.icio.us
Reply With Quote
Old 12-12-2008, 04:41 PM   #3 (permalink)
Contributing Member
 
Join Date: 12-11-08
Posts: 62
iTrader: 0 / 0%
Latest Blog:
None

Bart is liked by somebodyBart is liked by somebodyBart is liked by somebody
What development environment are you working in? PHP? ASP?

I hope this is in a password protected area, this would be a godsend to spammers.
Bart is offline  
Add Post to del.icio.us
Reply With Quote
Old 12-15-2008, 09:40 AM   #4 (permalink)
Contributing Member
 
Join Date: 06-24-08
Posts: 70
iTrader: 0 / 0%
Latest Blog:
None

chuco61 is liked by many
Quote:
Originally Posted by Bart View Post
What development environment are you working in? PHP? ASP?

I hope this is in a password protected area, this would be a godsend to spammers.
Yes this will be available only after logging into with .httaccess

i can support a php backend.

however ive never coded in php. any suggestions?
chuco61 is offline  
Add Post to del.icio.us
Reply With Quote
Old 12-15-2008, 12:07 PM   #5 (permalink)
Contributing Member
 
Join Date: 12-11-08
Posts: 62
iTrader: 0 / 0%
Latest Blog:
None

Bart is liked by somebodyBart is liked by somebodyBart is liked by somebody
Look up basic php syntax, w3 is a good place to start. The function you need is already built into PHP, the mail() function. You have to learn how to pass information from a form using the $_POST variable. This is the basic mail() function.

PHP Code:
<?php

$Name 
"Bart"//senders name
$email "email@adress.com"//senders e-mail adress
$recipient "PersonWhoGetsIt@emailadress.com"//recipient
$mail_body "The text for the mail..."//mail body
$subject "Subject for reviever"//subject
$header "From: "$Name " <" $email ">\r\n"//optional headerfields

ini_set('sendmail_from''me@domain.com'); //for linux i think

mail($recipient$subject$mail_body$header); //mail command :)
?>
If you want to take the easy way out pm me and i'll just write it up everything with the form quick.
Bart is offline  
Add Post to del.icio.us
Reply With Quote
Old 12-17-2008, 11:52 AM   #6 (permalink)
Contributing Member
 
Join Date: 06-24-08
Posts: 70
iTrader: 0 / 0%
Latest Blog:
None

chuco61 is liked by many
sent you a pm thanks!
chuco61 is offline  
Add Post to del.icio.us
Reply With Quote
Go Back   Webmaster Forum > Web Development > Coding Forum

Reply


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP Form - Email to Owner mcwb201 Coding Forum 3 07-12-2008 05:05 PM
Why won't my php form email results? watley Coding Forum 5 10-26-2007 08:36 AM
Email form headaches rearadmiral Coding Forum 2 06-15-2007 07:52 AM
PHP: Email form Optix Coding Forum 20 04-13-2007 06:04 PM
EMAIL FORM Rossco Web Design Lobby 3 10-29-2006 10:07 AM


Sponsor Links
Get exposure! Contextual Links V7N SEO Blog V7N Directory


All times are GMT -7. The time now is 05:51 AM.
© Copyright 2008 V7 Inc
Powered by vBulletin
Copyright © 2000-2009 Jelsoft Enterprises Limited.


Search Engine Optimization by vBSEO 3.3.0 ©2009, Crawlability, Inc.