Hello.
I have a login form on page 1. It checked for credentials and, on success, it redirects to page 2.
I understand there is a JSON response with the user data.
I need to use that information in page 2. I haven't found a way to use that data with either PHP and jQuery.
PAGE 1
<script > $('.send').click(function(event) { var email = $("#email").val(); var pass = $("#password").val(); var data = { 'email' : email , 'password' : pass } // replace XXX with your application ID $.ajax({ url: "https://api.knackhq.com/v1/applications/XXX/session", type: "POST", headers: {"X-Knack-Application-Id": "XXX", "X-Knack-REST-API-Key": "XXX"}, data: data, success: function(response) { alert('Sesion Successful and Redirect!'); } }); }); </script>
<form> <label> <input type="email" name="email" id="email" /> </label> <label> <input type="password" name="password" id="password" /> </label> <a href="#" class="send">Enviar</a> </form>
PAGE 2
??
I have no clue as to how to use the results.
Are they stored in the user session? A cookie?
Thank you.