Jump to content

AJAX/PHP/Javascript/login Help


riddleywalker

Recommended Posts

I had the bright idea of a login div at the top of the page that would dynamically change depending on where a person was in the login process:

 

Logged in, it would show the user and have a logout button.  Not logged in...it would display the standard username/password/forgot password items. 

 

I thought I would use Ajax to swap the contents of the div with the appropriate info, but that doesn't degrade nicely if the user is not using javascript.  Has anyone done this sort of thing?  Have a sample or point me in the right direction?  thanks.

Link to comment
https://forums.phpfreaks.com/topic/202191-ajaxphpjavascriptlogin-help/
Share on other sites

Dover over complicate yourself with ajax right now. If your just wanting a if statement that checks login gwolgamott's is it.

 

Since the user has to submit user name and password for validation dont worry about ajax since the page is already needing to reload just run the php if statement to change the html output.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.