For some reason when I click the login button for my form it redirects to the php page and then gives me HTTP Error 500. I'm new to PHP and I'm not really sure what I'm doing wrong.
Here's what's in my HTML file without a lot of CSS
<body style="background-color: #ff0000">
<div class="form">
<form action="login.php" method="POST">
<input id="w" type="text" name="Username" placeholder="Username">
<input id="w" type="password" name="Password" placeholder="Password">
<input id="s" type="submit" value="Submit"> <!--Do login checking stuff here, then go to staff homepage --->
</form>
<form action="index.html" style="margin: 0">
<input id="s" type="submit" value="Go Back">
</form>
</div>
</body>
And Here's my PHP file
<?php
$username = $_POST['username'];
$password = $_POST['password'];
$username = stripcslashes($username);
$password = stripcslashes($password);
$username = mysql_real_escape_string($username);
$password = mysql_real_escape_string($password);
$conn = mysql_connect("localhost", "root", "");
$db = mysql_select_db($conn, "id1394453_users");
$result = mysql_query("SELECT * FROM Users WHERE username = '$username' AND password = '$password'")
or die("Failed to query database".mysql_error());
$row = mysql_fetch_array($result);
if ($row['username'] == $username && $row['password'] == $password) {
echo "Login Success!".$row['username'];
} else {
echo "Failed to Login!"
}
?>