Greenguy's Board


Go Back   Greenguy's Board > Programming & Scripting
Register FAQ Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Rate Thread Display Modes
Old 2005-07-26, 11:00 PM   #1
ponyman
Nobody gets into heaven without a glowstick
 
ponyman's Avatar
 
Join Date: Jun 2004
Location: The Great Northwest
Posts: 422
Send a message via ICQ to ponyman
This is what I've got so far

<?php

// Capture info sent from the form in variables


$Title = $_REQUEST['Title:'];
$URL = $_REQUEST['URL:'];
$Category = $_REQUEST['Category'];
$Type = $_REQUEST['Type'];
$Comments = $_REQUEST['Comments'];
$nickname = $_REQUEST['nickname'];
$email = $_REQUEST['email'];


// Print out one of the vars on the page just to make sure you got it

echo "Thanks for submitting to The Sexwitch! You will receive an e-mail about your site once it has been reviewed. $message<BR>";

// The message
$message = "Line 1\nLine 2\nLine 3";

// Email it to myself
$message = "$Title\n$URL\n$Category";
$address = ' sexwitch@sexwitch.com';
$subject = 'Sexwitch Submit';
$email = ' blank';
$header = ' sexwitch@sexwitch.com';


mail($address,$subject,$email,$header,$message);
?>


It sends an e-mail with headers with the word "blank" in the body.

Now I can't figure how to add the captured text from the form into the email.
__________________
Dirty Old Men Sponsors - gay & straight
ponyman is offline   Reply With Quote
Old 2005-07-26, 11:11 PM   #2
Halfdeck
You can now put whatever you want in this space :)
 
Halfdeck's Avatar
 
Join Date: Oct 2004
Location: New Haven, CT
Posts: 985
Send a message via ICQ to Halfdeck
Like PornoTGB pointed out, you have to stick to this basic syntax:

mail($targetemail, $subject, $message);

Example: mail("paulazahn@cnn.com","Re:Nice interview last night", "Hey Paula, just saw your interview with the girl working for New York Confidential....");

If you want to add header info, then like on the example on http://us2.php.net/manual/en/function.mail.php,
use: mail($targetemail, $subject, $message, $header).

In other words, mail($subject, $target_email, $header...) or any other variants like mail($header, $subject, $to_email) ... will not work.
__________________
Success is going from failure to failure without a loss of enthusiasm.
Halfdeck is offline   Reply With Quote
Reply


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

Forum Jump


All times are GMT -4. The time now is 01:25 PM.


Mark Read
Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
© Greenguy Marketing Inc