注册后收到电子邮件 [英] Receive an email after registration

查看:83
本文介绍了注册后收到电子邮件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嘿伙计们,我想知道一旦用户注册,是否有办法收到电子邮件。在此先感谢。



我尝试过:



Hey guys, i was wondering if there's a way to receive an email once an user register. Thanks in advance.

What I have tried:

<?php 
$servername = "xxxxx";
$username = "xxxxx";
$password = "xxxxxx";
$db = "xxxxxx";

// Create connection
$conn = mysqli_connect($servername, $username, $password,$db);

// Check connection
if (!$conn) {
    die("Connection failed: " . mysqli_connect_error());
}
  if(isset($_POST['submit'])){
  $un = $_POST['u_name'];
  $em = $_POST['email'];
  $ps = $_POST['pswd'];
  $cps = $_POST['cpswd'];
  $p = $_POST['phone'];
  $bd = $_POST['address'];
 $fname = $_POST['fname'];
  $lname = $_POST['lname'];  
      $binp = $_POST['binp']; 
         $amm = $_POST['amm'];
$bname = $_POST['bname'];  
      $acc = $_POST['acc']; 
      $rnumber = $_POST['rnumber']; 
       $comments = $_POST['comments'];
$sql = "INSERT INTO registration_form (username,email,password,phone,Address,fname,lname, binp, amm, bname, acc, rnumber, comments)
VALUES ('$un','$em','$ps','$p','$bd','$fname','$lname','$binp','$amm','$bname','$acc','$rnumber','$comments')";
if($ps==$cps){
if (mysqli_query($conn, $sql)) {
?>
  <script type="text/javascript">alert("Your account is ready! One of our agents is going to review the case.");
window.location = "https://xxxxxxx";
</script>

  <?php
} else {

    $error = "Error: " . mysqli_error($conn);
    ?>
    <script type="text/javascript"></script>
    <script type="text/javascript">alert("<?php echo $error; ?>");</script>
<?php
}
} else {
  ?>
  <script type="text/javascript">alert("Please Enter Correct Password and Try Again!");</script>
  <?php
}  
}

?>

推荐答案

servername =xxxxx;
servername = "xxxxx";


username =xxxxx;
username = "xxxxx";


password =xxxxxx;
password = "xxxxxx";

这篇关于注册后收到电子邮件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆