I have Webpage written using PHP that displays data from MySQL tables. I want my page to refresh after new records are entered to the database.
love_bug 0 Newbie Poster
Recommended Answers
Jump to PostWhy not just reload the page using a submit button (most likely the same one you used to add the new records)?
<form method="post" action="<?php $_SERVER['PHP_SELF'] ?>"></form>
Jump to PostIn theory this is what needs doing.
1) Run a JS function every 10 seconds.
2) Run an AJAX statement in the function linking to check.php
3) In the check.php run a query to check the number of rows in the table.
4) Use the returned number from PHP in …
All 8 Replies
samarudge 16 Posting Whiz
kvprajapati 1,826 Posting Genius Team Colleague
OmniX 21 Practically a Master Poster
Josh Connerty 20 Unverified User
samarudge 16 Posting Whiz
OmniX 21 Practically a Master Poster
Josh Connerty 20 Unverified User
gelos 0 Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.