Re: New User Sign up Notification
| From: | Casey Chu | Date: | Sat, 23 Dec 2006 18:36:16 +0000 |
| Subject: | Re: New User Sign up Notification | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-246176@lists.php.net to get a copy of this message | ||
What do you mean by "now"?
On 12/22/06, JMCS Niagara (Jeff) <jeffsmobile@cogeco.net> wrote:
hi there. I'm looking to create a new user signup. So when someone signs up, it emails admin the Username, Real Name, and IP address. I have this code called newusersignupnotification.php <?php $to = 'admin@youronlinespace.com'; // The email address you want the notification sent to $subject = 'Member has registered on YoS'; // What do you want the subject line of your notification to be? $memberSpecs = "<hr size=2 width=300 align=left>". "<b>Username:</b> ".$_SESSION['username']. "<br>". "<b>Real Name:</b> ".$_SESSION['firstname']. " ".$_SESSION['lastname']. "<br>". "<b>Date</b> ".date('l dS \of F Y h:i:s A'). "<br>". "<b>IP address:</b> ".$_SERVER['REMOTE_ADDR']. "<br>". "<b>System Specs:</b> ".$_SERVER['HTTP_USER_AGENT']. "<br>"; $headers = "Content-type: text/html \nFrom: admin@youronlinespace.com"; $body = "<body> <br> <table cellspacing=1 cellpadding=2 align=center> <tr> <td> <b><font face=arial size=2>A new member has registered! </font></b> </td></tr> <tr> <td> <font face=arial size=2> ".$memberSpecs." </font> </td></tr></table> </body>"; mail($to,$subject,$body,$headers); ?> When I place this in the "join.php" file .. When someone goes to join.php it automatically emails it .. and I get date, time, ip, etc etc everything except for the username and first name.. Obviously, because the person hasn't typed in anything. When they filled out the sign up form, There's a button that says Sign Up .. Basically, when they click this button, NOW is when I want it to email me the details. Any ideas? Thanks guys