Jump to content

user registration and email send


wrathican

Recommended Posts

hey
i have created a users register section on my website
the only problem is that i am not that experienced at PHP and MySQL.
i have created the user registration form in flash. this has multiple information fields:
-first name
-surname
-email
-username
-password
-password(verify)
-postcode (i live in the UK)
-city
-country

all input fields have the same variable name, without spaces of course.

what i want to happen is when a user submits the form an email is sent to them informing them of their login details (username and password) an email sent to the site admin (me) informing me of their registration and also the variables inserted into a database table.

this is the code so far:
Code:
[code]
<?php
$sendTo = . $_POST["email"];
$subject = "Welcome to the LS12Style Website!";
$headers = "From: Ashley Broadley"; $headers .= "<[email protected]>\r\n";
$headers .= "Reply-To: [email protected]\r\n";
$headers .= "Return-Path: " . $_POST["email"];
$message = echo "Dear " . $_POST["firstname"] . " " . $_POST["surname"] . " <br>Thank you for registering with the LS12Style website. Your login details for the website as follows:<br>Username: " . $_POST["username"] . "<br> Password: " . $_POST["password"] ; mail($sendTo, $subject, $message, $headers); ?>[/code]

i want the message to be what i want it to say but including some variables from the form so getting rid of the need to type out their name manually.

any help with this?

thanks in advanced
Link to comment
https://forums.phpfreaks.com/topic/28259-user-registration-and-email-send/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.