# Php email form

**URL:** <https://forum.kirupa.com/t/php-email-form/97048>\
**Category:** Uncategorized\
**Created:** [December 17, 2003, 3:48am UTC](https://forum.kirupa.com/t/php-email-form/97048 "2003-12-17T03:48:36Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![minimalistik](https://avatars.discourse-cdn.com/v4/letter/m/e47774/32.png) [@minimalistik](https://forum.kirupa.com/u/minimalistik)\
**Post date:** [December 17, 2003, 3:48am UTC](https://forum.kirupa.com/t/php-email-form/97048/1 "2003-12-17T03:48:36Z")

</div>

this is what ive done:

[PHP[

\<?  
// Recieving and Creating Variables…  
$Name = $\_POST[‘name’];  
$Email= $\_POST[‘email’];  
$Email = "spillargroove@hotmail.com";  
$Message = $\_POST[‘message’];  
$Subject = “Contact”;  
$Header = “From: $Name \<$Email\>”;

//Performing Mail script…  
mail($Email, $Subject, $Message, $Header);

?\>

```auto

now everything working with the fla file and a msg sends to my inbox but when some user types his name, email, and message, willl it display his/her email address when i recieve the msg in my inbox?
```

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [December 17, 2003, 3:49am UTC](https://forum.kirupa.com/t/php-email-form/97048/2 "2003-12-17T03:49:24Z")

</div>

Yea it should. BTW, y’d u delete the previous post?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [December 17, 2003, 3:52am UTC](https://forum.kirupa.com/t/php-email-form/97048/3 "2003-12-17T03:52:18Z")

</div>

Oh! i’m really sorry about this. No it won’t show. Use a separate variable for your email address.  
Yu could replace  
$Email = "spillargroove@hotmail.com";

with

$toEmail = "spillargroove@hotmail.com";

and then after $Header, use

$Message = $Email + "

" + $Message

I truly apologize for not going through it properly.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [December 17, 2003, 3:55am UTC](https://forum.kirupa.com/t/php-email-form/97048/4 "2003-12-17T03:55:51Z")

</div>

so like this?

\<?  
// Recieving and Creating Variables…  
$Name = $\_POST[‘name’];  
$Email= $\_POST[‘email’];  
$toEmail = "spillargroove@hotmail.com";  
$Message = $\_POST[‘message’];  
$Subject = “Contact”;  
$Header = “From: $Name \<$Email\>”;

//Performing Mail script…  
mail($Email, $Subject, $Message, $Header);

?\>

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [December 17, 2003, 3:57am UTC](https://forum.kirupa.com/t/php-email-form/97048/5 "2003-12-17T03:57:55Z")

</div>

Like this:

```php

<?
// Recieving and Creating Variables...
$Name = $_POST['name'];
$Email= $_POST['email'];
$Message = $_POST['message'];
$toEmail = "spillargroove@hotmail.com";
$Subject = "Contact";
$Header = "From: $Name <$Email>";
$Message = $Email + "

" + $Message;

//Performing Mail script...
mail($toEmail, $Subject, $Message, $Header);

?>

```

The email of the sender will show at the top of the message

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [December 17, 2003, 4:05am UTC](https://forum.kirupa.com/t/php-email-form/97048/6 "2003-12-17T04:05:04Z")

</div>

somehow not working

hamza, could you take a look at my fla/php?

here they are:

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [December 17, 2003, 4:07am UTC](https://forum.kirupa.com/t/php-email-form/97048/7 "2003-12-17T04:07:11Z")

</div>

this is the php script

(note: the script is in .txt because uploading .php is not possible)

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [December 17, 2003, 4:10am UTC](https://forum.kirupa.com/t/php-email-form/97048/8 "2003-12-17T04:10:09Z")

</div>

this is what it says in my msn:

From : dhd \<[spillarg@lycos.co.uk](mailto:spillarg@lycos.co.uk)\>  
Sent : Wednesday, 17 December 2003 3:01:02 PM  
To : [spillargroove@hotmail.com](mailto:spillargroove@hotmail.com)  
Subject : Contact

0 (this is the text msg area)

the "spillarg@lycos.co.uk" should be the sender’s email address  
and ive tested it with one of my friends and it doesnt show his address.
