Jump to content

Refresh page after selecting link inside page which updating DB


solarisuser

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?
Link to comment
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
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

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.