Consider we have a login.php file as follows:
<?php
$username = $_POST['username'];
$password = $_POST['password'];
// check fields and if they were correct and they are  secure against injection attacks anf if there was the username and password
echo '<script> javascript code </script>';
?>
Can the hackers attack to the simple php code using the XSS attack? 
 
     
    