Jump to content

Archived

This topic is now archived and is closed to further replies.

solarisuser

Refresh page after selecting link inside page which updating DB

Recommended Posts

I have a PHP page with a few dropdown menus. Next to the dropdown menus, I have hyperlinks to other PHP pages that add data to the DB associated with each dropdown, incase the information needed in the dropdown is not there, someone can add it by going to the hyperlink next to the dropdown.

The problem is when the user is 90% down the page, and then has to add something to the last dropdown (so he has to add to the DB by clicking on a hyperlink and submitting a new record), but the new information is not in the dropdown unless the user refreshes the page, since refreshing the page would rerun the SELECT query.

Is PHP able to deal with this somehow, or should I be looking at JavaScript or something else?

Share this post


Link to post
Share on other sites
You will have to look to java to have things refresh right in the browser. PHP is server side so to update the page the server has to resend the data, which means refreshing the page and losing previous selections.

Ray

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.