# Urgent - simple PHP help needed!

**URL:** <https://forum.kirupa.com/t/urgent-simple-php-help-needed/243537>\
**Category:** programming\
**Created:** [November 8, 2007, 1:21am UTC](https://forum.kirupa.com/t/urgent-simple-php-help-needed/243537 "2007-11-08T01:21:57Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![boogooloo1](https://avatars.discourse-cdn.com/v4/letter/b/49beb7/32.png) [@boogooloo1](https://forum.kirupa.com/u/boogooloo1)\
**Post date:** [November 8, 2007, 1:21am UTC](https://forum.kirupa.com/t/urgent-simple-php-help-needed/243537/1 "2007-11-08T01:21:57Z")

</div>

Hi guys,

```auto
 
<?php 
 
$sendTo = "email@email.com"; 
$subject = "$name has registered"; 
$thanksTo = $_POST["email"]; 
$thanksSubject = "Thank you for visiting our website!"; 
$replyHeader = "From: email@email.com
"; 
$replyHeader .= "Reply-To: email@email.com"; 
$thanksMessage = "Thank you!"; 
 
mail($sendTo, $subject, "$name has registered. Details below:

Name: $name
Email Address: $email", $replyHeader); 
mail($thanksTo, $thanksSubject, $thanksMessage, $replyHeader); 
?> 

```

I’m using a Flash swf which outputs “name” and “email” to PHP, which I’ve done many times before. What I’m trying to do this time is auto-send a response to the user who’s registering, and also send a message to the website’s admin, telling them that someone’s registered. The above is a mix of a few tutorials I found, but it’s not working. I really need to solve this very quickly, so if someone could reply asap, it’d be much appreciated!

Boog 🙂
