Question: I deleted sensitive data but can someone tell me how can I succesfully make the variables obtained from $_POST compare with the variables like $receptionistFirstRequest

0) { $loginData = mysqli_fetch_array($loginResult); if ( $loginData['ReceptionistID'] == $receptionistIdRequest && $loginData['FirstName'] == $receptionistFirstRequest ) { echo($loginData['Password']); echo($loginData['ReceptionistID']); echo "success"; } else { // Invalid credentials echo "failed"; } } else { // No data found in the database echo "error"; } } else { // Query execution error echo "error"; } } ?> I deleted sensitive data but can someone tell me how can I succesfully make the variables obtained from $_POST compare with the variables like $receptionistFirstRequest or $receptionistLastRequest like it is above after I have clicked 'submit' on a html form and obtained the data from the database and it actually comes out succesful when I put the info in the form to be the exact same as the one in the database? it keeps saying failure for some reason, I'm not sure what I'm doing wrong.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!