Jump to content

How do I get e-mail notification for a new member?


daena76

Recommended Posts

I have a big problem. I got a membership script that does not notify web owner (me) of new sign-ups. Hence, no idea if someone registered and I can't activate membership. How and what do I add to the code below. The code here is the register.php file that points to the welcome page after a successful submit. (I am exceptionally a newbie so if you could just hold my hands and walk me through it, it'll be greeeeaat!) *wink TY ~Danes
===================================================================
<?
require_once("conn.php");
require_once("includes.php");

if(isset($_POST[s1]))
{


$q1 = "insert into class_members set
username = '$_POST[NewUsername]',
password = '$_POST[p1]',
FirstName = '$_POST[FirstName]',
LastName = '$_POST[LastName]',
Address = '$_POST[Address]',
City = '$_POST[City]',
State = '$_POST[State]',
ZipCode = '$_POST[ZipCode]',
Country = '$_POST[Country]',
Phone = '$_POST[Phone]',
AlternatePhone = '$_POST[AlternatePhone]',
Fax = '$_POST[Fax]',
email = '$_POST[email]',
RegDate = '$t' ";

mysql_query($q1);

if(mysql_error())



{
$error = "<font face=verdana size=2 color=red><b>The username <font color=black>$_POST[NewUsername]</font> is already in use!<br>Select another one, please!</b></font>";

unset($_POST[NewUsername]);
}
else
{
$last = mysql_insert_id();
$_SESSION[AgentID] = $last;


header("location:welcome.php");
exit();
}



}

//get the templates
require_once("templates/HeaderTemplate.php");
require_once("templates/RegistrationTemplate.php");
require_once("templates/FooterTemplate.php");

?>
================================================================
Hello,
You're just wanting a simple mail sent to you whenever someone signs up? Try this:


Right after this part:
$last = mysql_insert_id();
$_SESSION[AgentID] = $last;



Enter the following, but be sure to change around the information that you set variable to, set it to whatever you wish it to send to you. This variable will be the body of your email.

$variable = "$_POST[FirstName] $_POST[LastName] has just registered";

mail ($email, 'New User', $variable, 'From: _____@____.com');



Also change $email to the variable or exact address you want this mail to be sent to. The from is straight forward, it can be a variable or exact wording also. Any questions, just ask. Hope this helps.
[!--quoteo(post=384862:date=Jun 16 2006, 09:18 PM:name=aebstract)--][div class=\'quotetop\']QUOTE(aebstract @ Jun 16 2006, 09:18 PM) [snapback]384862[/snapback][/div][div class=\'quotemain\'][!--quotec--]
Hello,
You're just wanting a simple mail sent to you whenever someone signs up? Try this:
Right after this part:
$last = mysql_insert_id();
$_SESSION[AgentID] = $last;
Enter the following, but be sure to change around the information that you set variable to, set it to whatever you wish it to send to you. This variable will be the body of your email.

$variable = "$_POST[FirstName] $_POST[LastName] has just registered";

mail ($email, 'New User', $variable, 'From: _____@____.com');
Also change $email to the variable or exact address you want this mail to be sent to. The from is straight forward, it can be a variable or exact wording also. Any questions, just ask. Hope this helps.
[/quote]

Hi! This is what I put in:

$variable = "$_POST[FirstName] $_POST[LastName] $_POST[email] has just registered";

mail ($email, 'New User' $variable, 'From:[email protected]');

It seems I did something wrong cuz I did not receive any e-mail. *sorry :-( i'm slow*

[!--quoteo(post=384879:date=Jun 16 2006, 11:10 PM:name=homchz)--][div class=\'quotetop\']QUOTE(homchz @ Jun 16 2006, 11:10 PM) [snapback]384879[/snapback][/div][div class=\'quotemain\'][!--quotec--]
I think you have to designate the $email variable as your email address, in the script. Or since this will only go to you just replace $email with your address.
[/quote]


Thanks a lot to both of you!! I now have an effective new user e-mail delivery. [img src=\"style_emoticons/[#EMO_DIR#]/smile.gif\" style=\"vertical-align:middle\" emoid=\":smile:\" border=\"0\" alt=\"smile.gif\" /]

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.