0
votes

Is there any way to refresh the data after I click the submit button? Currently as I click the submit button on my PHP page, there are changes to the database. But, I will have to refresh the page itself to see the updated result, which I think it is quite incompetent.

To add on, what I am doing is on a table form. So example,

1) 14 Dogs.

So after i edit 14 dogs to 13 dogs and submit, the changes are successful as seen in the database, but the value won't change unless I refresh the page. Thank you all.

Additional Info:

I'm using XAMPP, Microsoft Access.

1
Unless you are using ajax, submitting a form already causes a page-refresh. You just need to make sure you process the data before you start displaying stuff.jeroen

1 Answers

1
votes

in your script, instead of

code that outputs data from database
code that updates database

do

code that updates database
code that outputs data from database

I just changed the order. Hopefully its obvious why.

im assuming youre using a regular form, no ajax or frames.