How to update a mysql database without reloading page

前端 未结 4 706
抹茶落季
抹茶落季 2020-12-18 13:26

thanks for looking. I have a very long list of items, users click on an image (a plus sign) to add the item to their personal list. At the moment when they click the + it l

4条回答
  •  抹茶落季
    2020-12-18 14:20

    You may really want to use Javascript in your project! See, because you are telling that you dont want to navigate out of the current page and want to give a small message on the current page saying a confirmation to the user.. then u need to use something called as AJAX-Asynchronous Javascript and XML. Its a addition of PHP and Javascript.

    Using AJAX u can update currently loaded page without refreshing it. Here HTML is not connecting or requesting the server but its the Javascript. Hence u can achieve -> [how would I go about making it all update the database without going anywhere]..

    And as far AJAX and Javascript is concerned, they r very simple! Just need to learn basic syntax of them and den on u can go further!!!

    references u can refer to:

    -> Best book for u to refer is -

    Professional Ajax Nicholas C. Zakas, Jeremy McPeak, Joe Fawcett

提交回复
热议问题