phpSensei Posted February 18, 2008 Share Posted February 18, 2008 I am currently learning ajax, and i need to know something. Can ajax connect to a mysql database, get the info, and put in vars without refreshing the page? Lets say i made a login system, and i dont want to refresh the page, just get all the info, check against the POST vars and show the finishing results without refreshing the page, also register sessions or cookies, is that possible? Quote Link to comment Share on other sites More sharing options...
phpQuestioner Posted February 18, 2008 Share Posted February 18, 2008 You would create a PHP page to do all this and then you would have your PHP page to echo out whatever you wanted to be returned to your responseText (the content that you want to display with AJAX in your page); if the member login and password is correct. Google "AJAX User Login" and you should be able to see some examples of how to do this. - Good Luck Quote Link to comment Share on other sites More sharing options...
phpSensei Posted February 18, 2008 Author Share Posted February 18, 2008 Wouldn't using php mean refreshing the page? I dont want any PHP included, plain AJAX, HTML, and JAVASCRIPT I also notice when reading the book, there is no topic covering any of this solution, with databases and all. Quote Link to comment Share on other sites More sharing options...
phpSensei Posted February 18, 2008 Author Share Posted February 18, 2008 I wanted to learn Ajax so create mysql queries, fetch info..etc without having to refresh any pages... Quote Link to comment Share on other sites More sharing options...
phpSensei Posted March 2, 2008 Author Share Posted March 2, 2008 Sorry for being such an idiot in this thread, I fully understood what you ment . I actually built a emailer, Chat Box (almost done), and comment pagination All works good when using open and get with ajax. Chao Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.