I am on openhab 2.5.1.
To protect some system functions I would like to implement a password protection - created a password entry screen:
password.html:
<html>
<form name="login" action="login.php" method="post">
Login Passwort:
<input type="password" name="passwort" value="" />
<input type="submit" value="Login" name="Login" />
</form>
login.php:
<?php
// login.php
$Passwort = "123456";
$Uebernahme = $_POST['passwort']; // Die Übernahme des eingegebenen Passwortes
// Nun die Abfrage:
if($Uebernahme == $Passwort)
{
echo'Das eingegebene Passwort ist richtig';
}
else
{
echo'Das eingegebene Passowrt ist falsch.<br />';
echo'Bitte gehen Sie <a href="javascriopt:history.back()">zurück</a> und versuchen Sie es erneut';
// Hier, wenn das Passwort falsch ist, soll ein Zurücklink erscheinen
}
?>
with the login.php I would like to test if the password is correct and do further actions.
After I press Enter it receive following answer:
HTTP ERROR 404
Problem accessing /static/login.php. Reason:
Not Found
Powered by Jetty:// 9.4.20.v20190813
The login.php is in the same folder as my password.html (openHAB-conf/html).
What is wrong - where do I have to place the login.php file.
Thanks for any hint.
Georg