Parse error: syntax error, unexpected end of file in /var/www/html/register.php on line 38
Anyone can help me?? I try to put ?> at the end but nothing is changed and I have also already tried to search online. This is the code:
<!DOCTYPE html>
<html>
<meta charset="utf-8">
<link rel="stylesheet" href="csslogin/style.css" />
</head>
<body>
<?php
require('config.php');
if (isset($_REQUEST['username'])){
$username = $_POST['$username'];
if (isset($_REQUEST['email'])){
$email = $_POST['$email'];
if (isset($_REQUEST['password'])){
$password = $_POST['$password'];
$trn_date = date("Y-m-d H:i:s");
$query = "INSERT into `users` (username, password, email, trn_date)
VALUES ('$username', '".md5($password)."', '$email', '$trn_date')";
$result = mysql_query($con,$query);
if($result){
echo "<div class='form'>
<h3>You are registered successfully.</h3>
<br/>Click here to <a href='login.php'>Login</a></div>";
}
}else{
?>
<div class="form">
<h1>Registration</h1>
<form name="registration" action="" method="post">
<input type="text" name="username" placeholder="Username" required />
<input type="email" name="email" placeholder="Email" required />
<input type="password" name="password" placeholder="Password" required />
<input type="submit" name="submit" value="Register" />
</form>
</div>
</body>
</html>