Jump to content

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:pepsi@pepsi.kom');

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\" /]
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.