Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- include_once 'indepen_functions.php';
- sec_session_start(); // Our custom secure way of starting a PHP session.
- if (isset($_POST['username'], $_POST['password'])) {
- $username = $_POST['username'];
- $password = $_POST['password']; // The hashed password.
- if (login($username, $password) == true) {
- // Login success
- header('Location: ../index.php');
- exit();
- } else {
- // Login failed
- echo '{ "message": "Voer het wachtwoord en gebruikersnaam opnieuw in" }';
- }
- } else {
- // The correct POST variables were not sent to this page.
- echo 'Invalid Request';
- }
- $('.login-form').validate({
- //other code..
- submitHandler: function (form) {
- form.ajaxSubmit();
- return false;
- }
- header('Location: /index.php');
- echo 'This page has moved to <a href="../index.php">here</a>';
- exit(0);
- $(".login-form").validate({
- success: function(label) { alert('Success'); },
- submitHandler: function() { alert('Submit'); }
- });
- window.location = 'your page path';
Add Comment
Please, Sign In to add comment