What is wrong in this code...?Code:<head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> <script type="text/javascript" src="sha512.js"></script> <script type="text/javascript"> function formhash(form, password) { // Create a new element input, this will be out hashed password field. var p = document.createElement("input"); // Add the new element to our form. form.appendChild(p); p.name = "p"; p.type = "hidden" p.value = hex_sha512(password.value); // Make sure the plaintext password doesn't get sent. password.value = ""; // Finally submit the form. form.submit(); } </script> <?php if(isset($_GET['error'])) { echo 'Error Logging In!'; } ?> </head> <body><form action="process_login.php" method="post" name="login_form"> Email: <input type="text" name="email" /><br /> Password: <input type="password" name="password" id="password"/><br /> <input type="button" value="Login" onclick="formhash(this.form, this.form.password);" /> </form> </body> </html>![]()



Reply With Quote




Bookmarks