Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Submit button that also send a notification to me...
Old 03-06-2008, 12:48 PM Submit button that also send a notification to me...
maydhyam's Avatar
Junior Talker

Posts: 2
Name: Maydhya Maraj
Trades: 0
Hi All,

Can anyone help me please....I have a simple HTML form...to register users, and I want that when the user clicks the submit button apart from the data being written to the DB, I want to be able to receive a notification of some sort that a new user has registered....

<form name="reg" id="reg" action="<?=$HTTP_SERVER_VARS['PHP_SELF']?>" method="post">
<table width="784" border="0" align="center" cellpadding="1" cellspacing="0" bordercolor="#FFFFFF" id="register">
<tr>
<td><h1 align="left" class="style3"><span class="style4">Enter your Badge Number:*</span></h1></td>
<td width="534" align="left"><input name="badge_num" id="badge_num" type="text" size="6" maxlength="6" onkeydown="if(event.keyCode==13) event.keyCode=9;" onblur="return badgeCheck('badge_num','fname','lname')" tabindex="1" /><span id="badgeerror" class="style17" ></span></td>
</tr>
<tr>
<td><h1 align="left" class="style3"><span class="style4">Enter your First Name:</span></h1></td>
<td width="534" align="left"><input name="fname" id="fname" onkeydown="if(event.keyCode==13) event.keyCode=9;" type="text" size="30" /></td>
</tr>
<tr>
<td><h1 align="left" class="style3"><span class="style4">Enter your Last Name:</span></h1></td>
<td width="534" align="left"><input name="lname" id="lname" type="text" size="30" onkeydown="if(event.keyCode==13) event.keyCode=9;"/></td>
</tr>
<tr>
<td><h1 align="left" class="style3"><span class="style4">Enter your Username:</span></h1></td>
<td width="534" align="left"><input name="uname" id="uname" type="text" size="30" onkeydown="if(event.keyCode==13) event.keyCode=9;" maxlength="30"/></td>
</tr>
<tr>
<td><h1 align="left" class="style3"><span class="style4">Enter your Password:*</span></h1></td>
<td width="534" align="left"><input name="passwd" id="passwd" type="password" tabindex="2" size="30" onkeydown="if(event.keyCode==13) event.keyCode=9;" maxlength="30"/></td>
</tr>
<tr>
<td><h1 align="left" class="style3"><span class="style4">Confirm Password:*</span></h1></td>
<td width="534" align="left"><input name="passwd_again" tabindex="3" id="passwd_again" type="password" size="30" maxlength="30" onkeydown="if(event.keyCode==13) event.keyCode=9;"/></td>
</tr>
</table>

<p align="left">
<input type="submit" name="Submit" value="Submit" tabindex="-1" />
</p>
<!--<tr><td>
<p>
<span id="txtHint"></span>
</p>
</td></tr>-->
</form>
maydhyam is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 03-07-2008, 07:33 PM Re: Submit button that also send a notification to me...
Extreme Talker

Posts: 246
Trades: 3
What specifically do you need help with?

You can check php.net/mail for the syntax and examples to send an email from PHP.

To store data in a database, start with php.net/mysql_connect.
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
CouponGuy is offline
Reply With Quote
View Public Profile
 
Old 03-26-2008, 01:24 PM Re: Submit button that also send a notification to me...
maydhyam's Avatar
Junior Talker

Posts: 2
Name: Maydhya Maraj
Trades: 0
Sorry for taking so ong to reply, I wanted to be notified in some way whenever a new user registers onto the site, but I figured it out..this is not where I needed to apply the notifying code (which is actually a simple chunk of code using the mail() function), i put the mail() code in the function where the data entered is verified against the employee table...

Quote:
//send email
$to = "somebody@somewhere.com";
$subject = "New Account Registered";
$from = "Application";
$msg = "User ".$username." (".$Badge.") has just registered. \nKindly contact the Administrator for access type to be given.";
$mailsend = mail("$to","$subject","$msg","From: ".$from."\r\nReply-To:"somebody@somewhere.com");
echo $mailsend ? "An email notification was sent to the System Administrator." : "The email notification wasn't sent to the System Administrator. Kindly go to the 'Contact Us' link on the home page and let us know. Thank you.";
maydhyam is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Submit button that also send a notification to me...
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.66803 seconds with 12 queries