Code problems in Dreamweaver
Hi There,
I've got a problem with my code, I am trying to create a login system so I can give clients logins to log on and access everything they need. I have some code and it keeps coming up with " {"code":"MethodNotAllowedError","message":"POST is not allowed"} " and I've looked all around and cannot fix it. Here is the code, any idea's ???
<?php
$host="localhost";
$user="root";
$password="";
$db="loginsystem";
mysql_connect($host,$user,$password);
$mysql_select_db($db);
if(isset($_POST['username'])){
$uname=$_POST['username'];
$password=$_POST['password'];
$sql="select * from loginform where user='".$uname."'AND pass='".$password."'limit 1";
$result=mysql_query($sql);
if(mysql_num_rows($result)==1){
echo " You Have Successfully Logged in";
exit();
}
else{
echo "You Have Gone Wrong Somewhere?!"
}
}
?>
<!DOCTYPE html>
<html>
<head>
<title>Login | LHWD</title>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<style>
@1552174 url('https://fonts.googleapis.com/css?family=Courgette');
</style>
<body>
<img src="Screen Shot 2017-12-26 at 12.53.03.png">
<form method="POST" action="#s" >
<input class="input-group usrpwd" type="text" name="uid" placeholder="Username/Email">
<br>
<input class="input-group usrpwd" type="password" name="pwd" placeholder="Password">
<button class="btn" type="submit" name="submit">Login</button>
</form>
</body>
</html>
Nachricht geändert durch Axel Matthies: Title changed.
