# N00b needs help with PHP Form Mailer

**URL:** https://forum.kirupa.com/t/n00b-needs-help-with-php-form-mailer/33391
**Category:** programming
**Created:** [October 18, 2003, 6:47pm UTC](https://forum.kirupa.com/t/n00b-needs-help-with-php-form-mailer/33391 "2003-10-18T18:47:28Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![Digigamer](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/digigamer/32/276_2.png) [@Digigamer](https://forum.kirupa.com/u/Digigamer)
#### Post date: [October 18, 2003, 6:47pm UTC](https://forum.kirupa.com/t/n00b-needs-help-with-php-form-mailer/33391/1 "2003-10-18T18:47:28Z")

</div>

ok I followed Not2Sure’s [PHP Form Mailer](http://www.kirupa.com/web/form_mailer.htm) and got it to work and everything but now how do I send e-mails to anyone who has signed up? Also I’d like it to send an e-mail to their e-mail address when they sign up. Any help is appriciated. btw, I have no php expirence.

---

<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: [October 19, 2003, 12:23pm UTC](https://forum.kirupa.com/t/n00b-needs-help-with-php-form-mailer/33391/2 "2003-10-19T12:23:38Z")

</div>

if you have one of your text fill which is for email addresses named as “Email”, then u can simply add another mailing line after the line that mails to you…  
like…

```php

mail($to, $subject, $msg, $headers);
mail($Email, $vistorsubject, $visitormsg, $visitorheaders);

```

make sure u declare these visitor variables too…if not ur visitor will get a blank mail…

to make something like a newsletter wher eu can send emails to all who had signed up, u can create a text file and then log emails into each line in the text file when visitors sign up.  
when send, u use the array() function to help to get to each of the lines(which are the email addresses of course) and put it into a loop to send to all the emails.

---

<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: [October 19, 2003, 9:06pm UTC](https://forum.kirupa.com/t/n00b-needs-help-with-php-form-mailer/33391/3 "2003-10-19T21:06:42Z")

</div>

> \*Originally posted by Digigamer \*  
> \*\*ok I followed Not2Sure’s [PHP Form Mailer](http://www.kirupa.com/web/form_mailer.htm) and got it to work and everything but now how do I send e-mails to anyone who has signed up? Also I’d like it to send an e-mail to their e-mail address when they sign up. Any help is appriciated. btw, I have no php expirence. \*\*

did you like the tut, was it helpful :nerd:

---

<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: [October 20, 2003, 2:07am UTC](https://forum.kirupa.com/t/n00b-needs-help-with-php-form-mailer/33391/4 "2003-10-20T02:07:45Z")

</div>

> \*Originally posted by Not2Sure \*  
> \*\*did you like the tut, was it helpful :nerd: \*\*

honestly i didn’t find it helpful at all ☹ you don’t explain any of the major code

```php

if ($_SERVER['REQUEST_METHOD'] == "POST") {
    foreach ($_POST as $key => $value) { 
        $msg .= ucfirst ($key) ." : ". $value . "
"; 
    }
}
else {
    foreach ($_GET as $key => $value) { 
        $msg .= ucfirst ($key) ." : ". $value . "
"; 
    }
}

mail($to, $subject, $msg, $headers); 
if ($forward == 1) { 
    header ("Location:$location"); 
} 
else {

```

there’s no explanation, the only use the tutorial serves is to copy and paste.

not trashing your tute bro, just being honest

---

<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: [October 20, 2003, 8:20am UTC](https://forum.kirupa.com/t/n00b-needs-help-with-php-form-mailer/33391/5 "2003-10-20T08:20:36Z")

</div>

yes but i do say you need no experience in PHP to use it. it is just there so people can use it not make them a wiz kid in PHP…

think of the childern:smirk:

---

<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: [October 20, 2003, 3:51pm UTC](https://forum.kirupa.com/t/n00b-needs-help-with-php-form-mailer/33391/6 "2003-10-20T15:51:13Z")

</div>

> \*Originally posted by Not2Sure \*  
> \*\*yes but i do say you need no experience in PHP to use it. it is just there so people can use it not make them a wiz kid in PHP…

think of the childern:smirk: \*\*

lol no doubt man your right… but for people like me who like to learn, there’s not much to learn. maybe u can give me a lil private lesson for $300 an hour. lol i crack myself up…

nice job man, and please dont think i was being an \*\*\* or anything…

edit: lol lmao omg… think of the children… lol

---

<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: [October 20, 2003, 7:09pm UTC](https://forum.kirupa.com/t/n00b-needs-help-with-php-form-mailer/33391/7 "2003-10-20T19:09:26Z")

</div>

> \*Originally posted by Digitalosophy \*  
> **think of the children**

yeah i love that, from the simpsons thats what ned flanders wife alwas says

---

<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: [October 23, 2003, 2:06pm UTC](https://forum.kirupa.com/t/n00b-needs-help-with-php-form-mailer/33391/8 "2003-10-23T14:06:56Z")

</div>

I followed the tutorial on how to make the PHP mailer perfectly and I can’t do it. After I paste in the text, then edit the specifications to my own fitting, and insert it into mailer.php and save it, then do I open up a new page and start posting the forms to fill the stuff up?
