Jquery PHP - How to handle login callback on same page? -


simply, website allows users login.

$('#login').click(function() {     var user = $('#username').val();     var pass = $('#password').val();     $.post('authorize.php', { username: user, password: pass }, function(data) {         //??     }); }); 

authorize.php verifies credentials assuring proper login. what? use jquery $.show hidden object, or load new content php page $.get or $.load? i'm uneasy on using $.show because elements loaded dom regardless of proper login. of takes place on same page. of these 2 options better practice? or there another?

using ajax request login not practice. anyway there 3 ways:

  1. you can add "blank" object dom without first, last names , other dynamic or important information , fill , show user logins.
  2. send dom object response authrize.php
  3. do not use ajax login :)

Comments

Popular posts from this blog

How do you change vbulletin's home page to the forums instead of the default (CMS or Activity Stream)? -

java - stack overflow exception on xml transformation -