0
Help me with code for this IMPLEMENTATION OF A TWO FACTOR AUTHENTICATION LOGIN SYSTEM USING ONE TIME PASSWORD (OTP) & BIOMETRIC
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.
+ 1
It appears you have posted the wrong link. đ
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'. " ".