If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

//NEW\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\//Create the variables to be used in the mail$to=$_POST['email'];$subject="Email Confirmation";$message="This is a confirmation email";//Use the mail function to send the confirmation emailmail($to,$subject,$message);

1. Have you looked at various tutorials available around the internet? They can guide you through this step by step.

2. Do you know PHP fairly well? It looks to me like this is just a matter of lining up the variables in the right places. When you see PHP, does it look like a foreign, unapproachable language? Do you want help with the basics? Or is this problem more complicated than I'm seeing? Do you know how to, for example, set $x=$y, so that you could copy one value to a new one?

3. a) Who receives the email now?
b) Who do you want to receive the email instead?
c) How do you want to determine that value?

PHP Contact Form Confirmation Email?

Hello,
I am trying to make this contact form send an confirmation email to the user just saying thank you for registering. I have tried several ways and can not get it to work. It always sends me an email but nothing to the users email.

I have tried your advice without any luck. I changed the code from POST to GET but it still does the same thing. It will send me the info perfectly how I want it to but the confirmation email does not send at all. I have been looking up tutorials and trying them all without luck. All I want is the email that is entered into the field to be sent an email from me that says thank you for registering.

Please refer back to my previous message and the questions there. It's very difficult to help someone when it requires a lot of guessing from us about what's actually going on.

What I would recommend, if this is intended as a learning experience, would be creating a new, blank document and retyping everything-- go through each line to see what it does and if it is necessary and whether anything is incorrect. The result will be cleaner.
If, on the other hand, you just want something that works, I'd suggest looking for a tutorial with working code (there are some out there) and starting from that. This has some confusing issues of what variable is used when (some don't seem to be doing anything).

Another idea: print this out and draw arrows to see where all of the text is going.

And another: print out (using 'echo') all of the information going into mail().

And: turn off the error suppression (@) before the mail() function. If you get an error, that's a good thing-- you should see what it says. You *might* want to turn it back on if you might be getting bad input from users later (though there are probably better ways to handle that).

1. find the name of the form field where the user enters their email
2. validate that the value in it is a single, valid email address
3. put that value in the first param of the mail function.

If you're having as much trouble as you say, I would suggest following Daniel's advice and starting over with a "clean slate." This way, you can eliminate any minor problems that might exist from previous (nonworking) attempts to fix it, and your code will be easier for you to understand and follow.