<?php
ini_set('session.save_path','/tmp');
session_start();
include "config.php";

$mobile = trim($_POST['mobile']);

$otp = rand(100000,999999);

$_SESSION['otp'] = (string)$otp;
$_SESSION['otp_mobile'] = $mobile;
$_SESSION['otp_time'] = time();

echo "<h2>Your OTP is: $otp</h2>";
echo "<a href='patient_login.php'>Go Back</a>";