Reputation: 21
I was running this php file correctly and it showed up on the browser yesterday, but today, all of a sudden, I wasn't able to see the file correctly and also couldn't find the code in the source code via browser.
Also, this is the tutorial I was following: https://www.youtube.com/watch?v=hAkKC8DKN9A
Here is the code:
<?php
error_reporting(E_ALL ^ E_NOTICE);
session_start();
?>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Member System - Log In</title>
</head>
<body>
<?php
$form = "<form action='./login.php' method='post'>
<table>
<tr>
<td>Username:</td>
<td><input type='text' name='user' /></td>
</tr>
<tr>
<td>Password:</td>
<td><input type='password' name='password' /></td>
</tr>
<tr>
<td></td>
<td><input type='submit' name='loginbtn' value='Login' /></td>
</tr>
</table>
</form>";
if ($_POST['loginbtn']) {
$user = $_POST['user'];
$password = $_POST['password'];
if ($user) {
if ($password) {
require("connect.php");
password = md5 (md5("kjfiufj".$password."Fjf56fj"));
echo "$password";
$query = mysql_query("");
mysql_close();
}
else
echo "You must enter your password. $form";
}
else
echo "You must enter your username. $form";
}
else
echo $form;
?>
</body>
</html>
Upvotes: 0
Views: 443
Reputation: 3488
PHP Parse error: syntax error, unexpected '=' on line 41. Replace
password = md5 (md5("kjfiufj".$password."Fjf56fj"));
to
$password = md5 (md5("kjfiufj".$password."Fjf56fj"));
Upvotes: 2