Question: ---Please find a secure way so sql injection won't happen Zap' 1=1 and I already have an array of the names and so forth...please correct

---Please find a secure way so sql injection won't happen Zap' 1=1 and I already have an array of the names and so forth...please correct the code

CSTutot Authenticate

// Needed For SQLFunctions getFaculty call

require_once('Includes/SQLFunctions.php');

// Needed For Utils check_input call

require_once('Includes/Utils.php');

// Retrieve Post Data

$wsuser = check_input($_POST["wsuser"]);

$wsemail = check_input($_POST["wsemail"]);

// Authenticate User

$student = getStudent($wsuser,$wsemail);

if (strlen($student->getTychoname())==0)

{

// Show the login form again.

include('index.html');

?>

Login Error

Sorry, the username and email do not match any current account.

Try again, or create an account using the link above.

}

else

{

// Set the session information

session_start();

$_SESSION['wsuser'] = $wsuser;

include('SearchSessions.php');

}

?>

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!