I am making a basic login web application and I am using the echo function in php to run some javascript to alert the user they got their username/password incorrect, for ease of doing something instead of just going to the main index.php file with no text in the form box's. For some reason my alert doesn't come up but I get redirected to my index.php. I don't know why this is happening?
/ / / This is the code that only half of it is running / / /
echo
'<script type="text/javascript">'
,'alert("a");'
,'</script>'
;
header("Location: /");
?>
Can someone please tell me if I have any syntax errors or any errors at all?
Thank you in advance -mjacob652
index.php's body
<div id="header">
<h1> Welcome to S.O.G <br/> Specials Operations Gaming </h1>
</div>
<div id="wrapper">
<h2> Please Log In </h2>
<form id="form" action="/Account/php/login.php" method="post" enctype="multipart/form-data">
Username: <input type="text" name="username"/> <br/>
Password: <input type="password" name="password"/> <br/>
<input id="submit" type="submit" value="Login" name="submit"/>
</form>
login.php just has the sql stuff and the echo and header