In this case, let's just call the table comments. In that database, create a table with the following fields in it:. Now before we move on, there's one more file we need to add. Ajax is a JQuery technology and so as you may have already guessed, we are going to need JQuery. Download JQuery from the JQuery website and add it in the root of your application.
Just take note that we have included links to our styles. The code in scripst. The first piece of script sends a request with data to the server when a user clicks on the post button. Thank you for following this post. I hope it helped you. If you have any worries or comments, just drop them in the comments section below. Privacy Policy Terms and conditions About Us. Toggle navigation.
Collectives on Stack Overflow. Learn more. How do i update mysql database with ajax and php in innerhtml Ask Question. Asked 12 years, 8 months ago. Active 4 years, 2 months ago. Viewed 40k times. How do i update mysql database with ajax and php with no page refresh. Add a comment. Active Oldest Votes. Chonchol Mahmud 2, 4 4 gold badges 33 33 silver badges 68 68 bronze badges.
Phill Pafford Phill Pafford I would also add some validation before doing any SQL query on user given values. Rigobert Song Rigobert Song 2, 2 2 gold badges 29 29 silver badges 46 46 bronze badges. Jez Jez 2, 1 1 gold badge 17 17 silver badges 29 29 bronze badges. Sign up or log in Sign up using Google.
Sign up using Facebook. Sign up using Email and Password. Post as a guest Name.
0コメント