send email at the time of registration in php

  • dheerhot
  • Novice
  • Novice
  • User avatar
  • Posts: 34

Post 3+ Months Ago

hey i wondring for sending email to the user at the time of completion of registration, like other sites do ....

so is there is any one who can help me, & its should be done in php.. :wink:

thanx in advance :P
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • Nebulous
  • Beginner
  • Beginner
  • Nebulous
  • Posts: 59
  • Loc: Hampshire, UK

Post 3+ Months Ago

Im presuming you already have a registration system inplace?

Look into using the mail() feature in PHP to send the email to the user, ideally you would want to place it after all of your validation checks (if any) and after the database insert.

Take a look at:

http://uk2.php.net/manual/en/function.mail.php
  • dheerhot
  • Novice
  • Novice
  • User avatar
  • Posts: 34

Post 3+ Months Ago

will it send an email at completion of registration......

actually i want to send a confirmation link to the user, so no one can register with fack email id...
  • Bogey
  • Genius
  • Genius
  • Bogey
  • Posts: 8395
  • Loc: USA

Post 3+ Months Ago

By default, it won't mail after registration. All you have to do to make it mail at registration is place the code in the correct spot and that would mail it. Once the reader gets to it. It's as easy as that.
  • dheerhot
  • Novice
  • Novice
  • User avatar
  • Posts: 34

Post 3+ Months Ago

please can u send me code....
  • Bogey
  • Genius
  • Genius
  • Bogey
  • Posts: 8395
  • Loc: USA

Post 3+ Months Ago

Code: [ Select ]
<?php

// do registration stuff here

if($no_mistakes_made)
{
    mail('to@email.com','My Subject', $message);
}
else
{
    echo "There was a problem. Please redo the form";
}
?>
  1. <?php
  2. // do registration stuff here
  3. if($no_mistakes_made)
  4. {
  5.     mail('to@email.com','My Subject', $message);
  6. }
  7. else
  8. {
  9.     echo "There was a problem. Please redo the form";
  10. }
  11. ?>


That's all to it.
  • dheerhot
  • Novice
  • Novice
  • User avatar
  • Posts: 34

Post 3+ Months Ago

oh thanx it had solved my problem thanx again...

Post Information

  • Total Posts in this topic: 7 posts
  • Users browsing this forum: Bogey and 96 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
cron
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.