php mysql questions
1.Edit the code below so it safe from attack, (injections). Thecode accepts a .txt file and executes the sql within in
if($_FILES){
$name = $_FILES[‘filename’][‘name’];
move_uploaded_file($_FILES[‘filename’][‘tmp_name’],$name);
echo “
“;
$sql = file_get_contents($name);
$queries = explode(“;” , $sql);
foreach($queries as $sql){
mysqli_query($conn, $sql);
}
if($queries == TRUE)
{
die(“Not Completed
“);
}
else if($queries == TRUE)
echo “Completed
“;
}
2. create two small tables
create a new database and at least two tables , one for usercredentials and the other for malware name and signature)
Expert Answer
An answer will be send to you shortly. . . . .