我正在使用MySql练习Android Studio,我正在尝试使用Php脚本
<?php
require "connect.php";
$userid = "pranav.gundra29@gmail.com";
$code=mt_rand(100000, 999999);
$mysql_qry = "select * from userinfo where userid = '$userid';";
$query = mysqli_query($conn ,$mysql_qry);
if(mysqli_num_rows($query)==1){
$row = mysqli_fetch_array($query);
$username = $row['username'];
$inserted= mysqli_query($conn, "UPDATE userinfo SET password recovery='$code' WHERE userid = '$userid' ");
$to = "$userid";
$subject = "reset password link";
$header = "From: pranav@example.com". "\r\n" .
$body = "Hi $username your password reset link
To reset the password please click on the below link:
$code;
$sent=mail($to,$subject,$body,$header);
if($inserted) {
echo ' check your mail we have sent you reset link to change your password! <br>';
}
} else {
echo ' Failed To Login ';
}
<?
我在文件末尾使用了"<?php"
,但仍然是同样的错误
请帮助我失踪的地方