This is Interesting: Free Magazines for Graphics designers and webmasters  


Home > Archive > Dreamweaver > September 2004 > php mailform help!





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author php mailform help!
myriot

2004-09-18, 7:15 pm

im working on a PHP mailform for my site.... and im really good with PHP but
for some reason.... when i send a test email from my site everything works but
for the reply it says "nobody"
here is my PHP script

<?php

//Declare the variables
$recipient = "josh@startariot.net";
$subject = "subject";
$message = "name: $name
email: $email
subject: $subject
comments: $comments";

//Contents of form
$name=$_POST['name'];
$email=$_POST['email'];
$subject=$_POST['subject'];
$comments=$_POST['comments'];

//mail() function sends the mail
mail($recipient,$subject,$message,$email);

//This line sends to thankyou page when finished
header("Location: thanks.php");
?>


can anyone help?

myriot

2004-09-18, 7:15 pm

THANK YOU!!!!! IT WORKS!!! I LOVE YOU!!!!! IVE SPENT 2 DAYS TRYING TO FIGURE IT OUT!!!!!
waddawadda

2004-09-18, 7:15 pm

mail("$recipient", "$subject", "$message", "From: $email"}
waddawadda

2004-09-18, 7:15 pm

no problem, just try to help out others.
Michael Fesser

2004-09-18, 11:15 pm

.oO(myriot)

>im working on a PHP mailform for my site.... and im really good with PHP but
>for some reason.... when i send a test email from my site everything works but
>for the reply it says "nobody"


The manual explains how to send additional headers like a "From:" for
example.

http://www.php.net/mail

Another thing:

> //This line sends to thankyou page when finished
> header("Location: thanks.php");


The location header requires an absolute address including scheme (http)
and hostname.

http://www.php.net/header

Micha
Michael Fesser

2004-09-24, 12:16 pm

.oO(myriot)

>im working on a PHP mailform for my site.... and im really good with PHP but
>for some reason.... when i send a test email from my site everything works but
>for the reply it says "nobody"


The manual explains how to send additional headers like a "From:" for
example.

http://www.php.net/mail

Another thing:

> //This line sends to thankyou page when finished
> header("Location: thanks.php");


The location header requires an absolute address including scheme (http)
and hostname.

http://www.php.net/header

Micha
Sponsored Links


Copyright 2003 - 2008 forum4designers.com  Software forum  Computer Hardware reviews