-
Notifications
You must be signed in to change notification settings - Fork 0
/
settings.php
27 lines (19 loc) · 840 Bytes
/
settings.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<?php
session_start();
$useremail = $_SESSION["email"];
//add the information by which you wan to send te email
$username_mail = "xyz@gmail.com";
$username_pwd = "123";
//to generate otp
$otp = rand(100000,999999);
$strotp = "$otp";
//message which need to be send in email
$msg = "<h2>You are on your way! Lets confirm your E-Mail address!</h2><h3>As you can verify your account by clicking on here <a href='localhost/mailsenderverify.php?otp=$strotp&mail=$useremail'> click here</a></h3><h4>Thanks for making a account on XYZ!<br>Regards Team XYZ.</h4>";
$dbservername = "localhost";
$dbusername = "root";
$dbpassword = "";
$dbname = "userlogin";
$conn = mysqli_connect($dbservername, $dbusername, $dbpassword, $dbname);
$sql= "UPDATE logindetail SET otp='$strotp' WHERE email='$useremail'";
mysqli_query($conn,$sql);
?>