0xV3NOMx
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 : 18.191.14.62


Current Path : /var/www/html/pgadm2020/pgetadm/
Upload File :
Current File : /var/www/html/pgadm2020/pgetadm/signup.php

<?php

include ("../database.php");

error_reporting(E_ALL);
ini_set('display_errors', 'on');

$mobile = trim($_POST['mobile']);
$email = trim($_POST['email']);
$name = trim($_POST['name']);
$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";

// var_dump($query);
$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}',
				fname = '{$name}', femail = '{$email}'
				where fmobileno = '{$mobile}'";
	$result = mysqli_query($conn,$query);
	if($result == 1)
	{
		$arr["status"] = 'success';
		
	}
	else
	{
		$arr["status"] = 'error';
	}
}
else
{
	$arr["status"] = 'invalid';
}
echo json_encode($arr);

?>