Tell me more ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I created login form. When user clicks on login button this form shows up with some fade effect (jQuery). What I want to do is to display error message in this form when user inputs invalid data. Before showing any messages, PHP must read data from database, therefore page must be reloaded and when page is reloaded this form fade away. How can I display error message in this login form without reloading page?

(I have lots of code so if you need any part of code I will provide)

share|improve this question

1 Answer

up vote 2 down vote accepted

What you are looking for is JQuery's ajax methods.

They can get data from the server and update your dom on the fly without a page reload.

This is pretty straightforward using Get or Post

JQuery also has some other ajax methods which may be useful as well.

share|improve this answer
Thank you, this works – Alen Jul 30 at 16:09

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.