Skip to content Skip to sidebar Skip to footer

Get Error When Trying To Send New Password To E-mail By Php

I'm a beginner of php and now getting stuck on sending a new password to user e-mail if user requested in android. ForgetPassword.php

Solution 1:

Notice: Undefined index: forgotpassword

You have to make sure the index is the same from android & PHP.

Wrap your code around the following check:

if(isset($_POST['forgotpassword'])){//code here}else{//undefined}

Warning: mysqli_query() expects at least 2 parameters, 1 given

As the error says, a param is missing, which is the connection:

$result = mysqli_query($con,"SELECT email from users WHERE email = '$email'");

(Add the connection as a 2nd parameter of your db function)

Warning: mysqli_num_rows() expects parameter 1 to be mysqli_result, null given

this is because the query failed.to avoid this error, add more checks:

if($result){
   $no_of_rows = mysqli_num_rows($result);
}else{
   //failed
}

Post a Comment for "Get Error When Trying To Send New Password To E-mail By Php"