![]() |
![]() |
![]() |
||||
Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us. |
![]() ![]() |
|
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
Thread Tools |
![]() |
#1 |
Confirmed User
Join Date: Jul 2002
Location: Fantasy Island
Posts: 1,770
|
php coders, I need your help...
how do I get this code to send me an email with the person who is sending it email in the from area of an email, right now it puts my own email address in there so i cant hit reply send. i have to manually copy paste the senders email from the contents of the mail that i receive.
here is the code im using: <? // Configuration Settings $SendTo = "[email protected]"; $SubjectLine = "subject"; $ThanksURL = "thankyou.html"; //confirmation page $Divider = "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"; // Build Message Body from Web Form Input $MsgBody = @gethostbyaddr($_SERVER["REMOTE_ADDR"]) . "\n$Divider\n"; foreach ($_POST as $Field=>$Value) $MsgBody .= "$Field: $Value\n"; $MsgBody .= "$Divider\n" . $_SERVER["HTTP_USER_AGENT"] . "\n"; $MsgBody = htmlspecialchars($MsgBody); //make content safe // Send E-Mail and Direct Browser to Confirmation Page mail($SendTo, $SubjectLine, $MsgBody, $emailaddress ,"From: $http_referrer\n"); header("Location: $ThanksURL"); ?>
__________________
Get A $25 Circuit City GIFT Card - FREE! ![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#2 |
Confirmed User
Join Date: Jul 2002
Location: Fantasy Island
Posts: 1,770
|
also how do i get to embed the subject line of my email in the subject line of the email being sent instead of: "subject"
__________________
Get A $25 Circuit City GIFT Card - FREE! ![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#3 |
Confirmed User
Join Date: Jul 2003
Location: chicago
Posts: 1,135
|
PHP Code:
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#4 |
Confirmed User
Join Date: Jul 2003
Location: chicago
Posts: 1,135
|
er oops pasted wrong thing lol
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#5 |
Confirmed User
Industry Role:
Join Date: Jul 2003
Posts: 712
|
something is wrong with this variable -> $http_referrer
post code of the form that you use with this script |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#6 |
Confirmed User
Industry Role:
Join Date: Jul 2003
Posts: 712
|
try something like this mail($SendTo, $SubjectLine, $MsgBody, "From: $emailaddress\n");
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#7 | |
Confirmed User
Join Date: Jul 2002
Location: Fantasy Island
Posts: 1,770
|
Quote:
![]()
__________________
Get A $25 Circuit City GIFT Card - FREE! ![]() |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#8 | |
Confirmed User
Join Date: Jul 2002
Location: Fantasy Island
Posts: 1,770
|
Quote:
<form action="feedback.php" method=hahahahahaha> <table border="0" align="center" cellpadding="8" cellspacing="8" summary="feedback form"> <tr> <td> <table border="0" cellpadding="8" cellspacing="8" summary="feedback form"> <tr> <td><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><strong>Subject:</strong></font></td> <td><select name="subject" id="subject"> <option value="I have a question about how to order your product." selected>I have a question about how to order your product.</option> <option value="I have a question about your product and would like some info.">I have a question about your product and would like some info.</option> <option value="I want to know the status of an order I have already placed.">I want to know the status of an order I have already placed.</option> <option value="I am not happy with this product and would like a refund.">I am not happy with this product and would like a refund.</option> <option value="I have a question regarding your affiliate/webmaster program.">I have a question regarding your affiliate/webmaster program.</option> <option value="I need to update my shipping address information.">I need to update my shipping address information.</option> <option value="I wish to cancel my order.">I wish to cancel my order.</option> <option value="I want wholesale/reseller information about your product.">I want wholesale/reseller information about your product.</option> <option value="I received SPAM which appears to be promoting your product.">I received SPAM which appears to be promoting your product.</option> </select></td> </tr> </table> <p><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><strong>Comments</strong></font><br /> <textarea rows="15" cols="65" name="comments"> </textarea> </p> <table border="0" cellpadding="8" cellspacing="8" summary="feedback form"> <tr> <td width="94"><strong><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Your Name:</font></strong></td> <td width="270"><input name="name" type="text" id="name" size="25" /></td> </tr> <tr> <td><strong><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Email Address:</font></strong></td> <td><input name="emailaddress" type="text" id="emailaddress" size="25" /></td> </tr> <tr> <td><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><strong>Order Number:</strong></font></td> <td><input name="ordernumber" type="text" id="ordernumber" size="25" /></td> </tr> </table> </td> </tr> <tr> <td align="center"> <input type="submit" value="Send Feedback" /> <br /> </td> </tr> </table> </form>
__________________
Get A $25 Circuit City GIFT Card - FREE! ![]() |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#9 |
Confirmed User
Join Date: Jul 2004
Location: somethere
Posts: 270
|
show me the html of your form, i need to see how you store the email address of the visitor. Subject line changes with variable $subject = "type anything here";
__________________
http://www.myadultblogs.com/ - trade hardlinks with my blogs - more than 100 blogs. |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#10 |
Confirmed User
Industry Role:
Join Date: Jan 2002
Posts: 7,981
|
If the form variable where the senders email in is called "senderemai", it should look like this:
mail($SendTo, $SubjectLine, $MsgBody, "From: ".$_REQUEST["senderemai"]."\n"); Change "senderemai" to what it is really called. |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#11 |
Confirmed User
Industry Role:
Join Date: Jan 2002
Posts: 7,981
|
Ok, it looks like it is called: "emailaddress" so change it to that.
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#12 |
Confirmed User
Join Date: Jul 2004
Location: somethere
Posts: 270
|
this will help:
mail($SendTo, $SubjectLine, $MsgBody, "From: ".$_REQUEST["emailaddress"]);
__________________
http://www.myadultblogs.com/ - trade hardlinks with my blogs - more than 100 blogs. |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#13 |
Confirmed User
Join Date: Jul 2004
Location: somethere
Posts: 270
|
and by the way,
$SubjectLine = "subject"; here changes the subject line
__________________
http://www.myadultblogs.com/ - trade hardlinks with my blogs - more than 100 blogs. |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#14 | |
Confirmed User
Join Date: Jul 2002
Location: Fantasy Island
Posts: 1,770
|
Quote:
__________________
Get A $25 Circuit City GIFT Card - FREE! ![]() |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#15 |
Confirmed User
Industry Role:
Join Date: Jul 2003
Posts: 712
|
ok, it works now
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#16 | |
Confirmed User
Join Date: Jan 2005
Location: United Kingdom
Posts: 7,990
|
Quote:
![]() |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#17 |
Confirmed User
Join Date: Jul 2002
Location: Fantasy Island
Posts: 1,770
|
the email address field is working great.
the subject is still not changing though, here is what i tried: mail($SendTo, $SubjectLine = "subject", $MsgBody, "From: ".$_REQUEST["emailaddress"]."\n"); this sends the email properly but still doesnt change the subject line and this way: mail($SendTo, $SubjectLine = "subject";, $MsgBody, "From: ".$_REQUEST["emailaddress"]."\n"); doesn't send out at all. any ideas?
__________________
Get A $25 Circuit City GIFT Card - FREE! ![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#18 |
Confirmed User
Industry Role:
Join Date: Jan 2002
Posts: 7,981
|
<?
// Configuration Settings $SendTo = "[email protected]"; $SubjectLine = "subject"; $ThanksURL = "thankyou.html"; //confirmation page $Divider = "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"; That the $SubjectLine you need to change. |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#19 |
Confirmed User
Join Date: Jul 2002
Location: Fantasy Island
Posts: 1,770
|
how do i get that to pull from the list of subjects in the drop down menu on the email form page, instead of the generic 'subject' that it puts in on the feedback php page?
__________________
Get A $25 Circuit City GIFT Card - FREE! ![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#20 |
Confirmed User
Industry Role:
Join Date: Jan 2002
Posts: 7,981
|
mail($SendTo, $_REQUEST["subject"], $MsgBody, "From: ".$_REQUEST["senderemai"]."\n");
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#21 |
Confirmed User
Join Date: Jul 2002
Location: Fantasy Island
Posts: 1,770
|
Thank You!! That did it, it works like a charm, both the email and subject are exactly the way i wanted them be when the form is used.
![]() You just made my day Swedguy, i have been looking around for the right code for this for a while now. Your help is much appreciated. ![]()
__________________
Get A $25 Circuit City GIFT Card - FREE! ![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |