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.

PHP Forum


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



Freelance Jobs

Reply
mailin assistance please?
Old 06-07-2008, 05:25 PM mailin assistance please?
aslanandbeez's Avatar
Experienced Talker

Posts: 39
Trades: 0
Okay I'm doing the whole email form thing on my site, and I want the name and email address from the form to go into the header, here's my code

<?php

$to = 'culturaldissection@hotmail.com';
$name = $_POST['name'];
$email = $_POST['email'];
$subject = $_POST['subject'];
$message = $_POST['message'];
$headers = 'From: $name $email' . "\r\n" .
'Reply-To: $email' . "\r\n" .
'X-Mailer: PHP/' . phpversion();

mail($to, $subject, $message, $headers);
echo "Your message has been sent, thank you";

?>


Also I'm hoping to adapt this for an e-card service, so would I have to put the selected card and a message into a function called $content for instance then do something like;

$message = '$content';

or am I on completely the wrong track?
__________________
Aslan & Beez Web Design - Today, Tomorrow, Forever
aslanandbeez is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 06-09-2008, 07:01 AM Re: mailin assistance please?
Average Talker

Posts: 18
Name: Phil
Location: Scotland
Trades: 0
I don't know what you mean by 'name and email address from the form to go into the header', are you wanting it to send with the site visitor's entered email and name? and not ones hard coded into the php?
Bozebo is offline
Reply With Quote
View Public Profile Visit Bozebo's homepage!
 
Old 06-09-2008, 01:50 PM Re: mailin assistance please?
aslanandbeez's Avatar
Experienced Talker

Posts: 39
Trades: 0
Yeah, I want it to be sent to my email address
__________________
Aslan & Beez Web Design - Today, Tomorrow, Forever
aslanandbeez is offline
Reply With Quote
View Public Profile
 
Old 06-09-2008, 01:54 PM Re: mailin assistance please?
aslanandbeez's Avatar
Experienced Talker

Posts: 39
Trades: 0
I also want to do some ecards where a choice of four designs are selected with a radio button, and a written message, to be sent to an email address that has been entered into the form, how do I put these together in the $message function? If that is correct
__________________
Aslan & Beez Web Design - Today, Tomorrow, Forever
aslanandbeez is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to mailin assistance please?
 

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