Help on simple email form.....

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
justinvz777
Forum Newbie
Posts: 1
Joined: Tue Aug 21, 2007 6:55 pm

Help on simple email form.....

Post by justinvz777 »

feyd | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]


I am using a Email form with flash and PHP, it works fine.

But in the From section when the email is delivered, its anonymous or nobody.

I need to get the senders email in there so i can just hit reply and it will send back to their specified email address.

Here is my code....

Code: Select all

<?PHP
$to = "justin@dynamicgs.com.au";

$msg .= "Enquiry From Dynamic Website\n\n";

$msg .= "Name: " . $HTTP_POST_VARS["name"] . "\n\n";

$msg .= "Phone: " . $HTTP_POST_VARS["phone"] . "\n\n";

$msg .= "Email: " . $HTTP_POST_VARS["email"] . "\n\n";

$msg .= "Message: " . $HTTP_POST_VARS["message"] . "\n\n";

mail($to, $HTTP_POST_VARS["name"], $msg, "Website Enquiry\n\nReply-To:". $HTTP_POST_VARS["email"] . "\n\n");
?>
Any help would be much apprecieated.....


feyd | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Post by Christopher »

I just commented on making a field required in another thread. The code is sort of a minimal form controller. It may be of help. You might want to read the entire thread.

viewtopic.php?p=409957#409957
(#10850)
Post Reply