This topic is locked

Send Email When User is online

9/15/2007 8:39:52 AM
PHPRunner General questions
L
lawfour author

I am using the After Successful Login Event to send email.
What I want to do is send Admin [me] an email everytime a registered user logins in to database, I tried using this code
// ** Send simple email ****
$email="lawfour@comcast.net";

$message="Movie Site\n Has a registered visitor";

$subject="Someone Logged into Movie Site";

$_SESSION["Username"];

mail($email, $subject, $message, $_SESSION );
But I get a error, can someone help me out.
I would rather have what this forum has at the bottom of the page that shows users name online but I could not find the code anywhere only code i found was the number of people logged on.
Thanks

L

Sergey Kornilov admin 9/15/2007
$email="lawfour@comcast.net";

$message="Movie Site\n Has a registered visitor: " . $_SESSION["UserID"];

$subject="Someone Logged into Movie Site";

mail($email, $subject, $message);
L
lawfour author 9/15/2007

Wow, you put a smile on my face.. Code worked perfectly.
Thanks

L


$email="lawfour@comcast.net";

$message="Movie Site\n Has a registered visitor: " . $_SESSION["UserID"];

$subject="Someone Logged into Movie Site";

mail($email, $subject, $message);