Insert and view data without refresh using PHP, MySql and AJAX

Must Read : Insert and view data without refresh using PHP, MySql and AJAX

Insert and view the data from database without refresh using PHP, MySql, AJax and JQuery. this concept is mostly searching by everyone, here i’m going to show you that, in an usual insert and view take page refresh. so the loading will make page loading delay, so here i’m going use AJAX for make that insert and view without refreshing the page.

for that we need to make three file to clear explanation. let see those files.
  1. DB.PHP
  2. INDEX.PHP
  3. ACTION.PHP
The above three files details below here.
DATABASE DETAILS
database name : wearecoders
table name : comment
column names : id, msg, ip_add

DB.PHP

INDEX.PHP

in the same index.php file, we have to add  the AJAX details to make operation. let see the AJAX

AJAX

the above is the script for make the function without refreshing the page.

ACTION.PHP

the above showbox is to show the msg, what was store in the database.

(Visited 1,088 times, 2 visits today)

Leave a Comment.