Linux ip-172-26-7-228 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64
Your IP : 13.58.211.135
<?php
include ("database.php");
error_reporting(E_ALL);
ini_set('display_errors', 'on');
$mobile = trim($_POST['mobile']);
$mobileotp = trim($_POST['motp']);
$dob = trim($_POST['dob']);//password
$passwd = trim($_POST['password']);
//and fmobileotp = '3313'
$query = "SELECT * from collstud
where fmobileno = '{$mobile}'
and fmobileotp = '{$mobileotp}'
and ROUND(time_to_sec((TIMEDIFF(NOW(), fmobotptime))) / 60) <= 10";
$result = mysqli_query($conn,$query);
$row = mysqli_fetch_assoc($result);
$count = mysqli_num_rows($result);
if($count >0)
{
$query = "update collstud set fmobilevalid = 'T', factive = 'T',
fdob = '{$dob}', fpasswd ='{$passwd}'
where fmobileno = '{$mobile}'";
$result = mysqli_query($conn,$query);
if($result == 1)
{
$arr["status"] = 'success';
/*$ip = $_SERVER['REMOTE_ADDR'];
$strUserLogQuery = "insert into userlog
(funivcode, fregno, fmobileno, fipadd, FREASONCODE, FDESCPN)
values
('{$row['FUNIVCODE']}', '{$row['FREGNO']}', '{$row['FMOBILENO']}', '{$ip}',
'REGN', 'REGN - {$row['FREGNO']} Registered to Student Portal')";
$result = mysqli_query($conn,$strUserLogQuery);*/
}
else
{
$arr["status"] = 'error';
}
}
else
{
$arr["status"] = 'invalid';
}
echo json_encode($arr);
?>
|