0) { $result = mysqli_fetch_assoc($sql); $admin_id = $result['admin_id']; $otp = strval(rand(1000, 9999)); $from = "info@theoceanstudios.in"; $to = $email_id; $subject = "Your One-Time Password (OTP)"; $headers = "From: " . strip_tags('info@theoceanstudios.in') . "\r\n"; $headers .= "Reply-To: " . strip_tags('info@theoceanstudios.in') . "\r\n"; $headers .= "Content-Type: text/html; charset=UTF-8\r\n"; $message = ' Your One-Time Password (OTP)

Dear User,

Your OTP for verification is: ' . $otp . '.

'; if (mail($to, $subject, $message, $headers)) { $_SESSION["OTP"] = $otp; // header("Location: otp.php?id=$admin_id"); header("Location: otp/$admin_id"); } else { echo 'error'; } } else { $error = 'Invalid Email ID'; } } ?> Admin - Auspicious Business Solutions

Forgot Password

Back