T
TiNd3r
VIP
VIP
Retired
Code:
<?php
$rowsfound=false;
if (isset($_GET['frmStudentId']))
{
// functions to make performQuery() work correctly
require_once("dbfunctions.inc.php");
$query = "SELECT dbStudentId, dbStudentName " .
" FROM student " .
" WHERE dbStudentId = '".$_GET['frmStudentId']."'" .
" AND dbPassword = '".$_GET['frmPassword']."'";
$result = performQuery($query);
if(count($result) > 0)
{
$rowsfound=true; // allow login
}
}
// code continues by generating appropriate response ...
Critically analyse and explain the security issues of deploying this code. To support your analysis, construct new code fragments to secure this login code and explain how they work.
Its part of my homework, being a noob I don't really know, if anyone could help it would be great!
Thanks!