0

Help me with code for this IMPLEMENTATION OF A TWO FACTOR AUTHENTICATION LOGIN SYSTEM USING ONE TIME PASSWORD (OTP) & BIOMETRIC

https://www.sololearn.com/discuss/1316935/?ref=app

6th Jun 2018, 7:23 PM
Musa Ibrahim Khalil
Musa Ibrahim Khalil - avatar
3 Answers
+ 1
Sure. I don't see the code you're referring to though? Post it up and I don't mind helping you figure out what you're getting stuck on.
6th Jun 2018, 7:28 PM
Fata1 Err0r
Fata1 Err0r - avatar
+ 1
It appears you have posted the wrong link. 😛
6th Jun 2018, 9:22 PM
Rrestoring faith
Rrestoring faith - avatar
0
here are the code Login form <?php include "header.php"; include "function.php"; require('db.php'); session_start(); // If form submitted, insert values into the database. if (isset($_POST['button'])) { $name = ($_REQUEST['name']); $password = ($_REQUEST['password']); mysqli_real_escape_string($con, $name); mysqli_real_escape_string($con, $password); //Checking is user existing in the database or not $query = "SELECT * FROM `user` WHERE name='$name' and password='$password'"; $result = mysqli_query($con,$query) or die(mysql_error()); $rows = mysqli_num_rows($result); if($rows==1){ $details = $result->fetch_array(); $_SESSION['name'] = $details['name']; $_SESSION['user_id'] = $user_id = $details['user_id']; $code = randomActivate(); $realcode = active_exist($code); $insert = "INSERT INTO otp VALUES(NULL,'$realcode', '$user_id' )"; $result = mysqli_query($con,$insert) or die(mysql_error()); sms ('Otp',$details['phone'],'Your otp code is'. " ".
6th Jun 2018, 8:16 PM
Musa Ibrahim Khalil
Musa Ibrahim Khalil - avatar