Jump to content


Refresh page after selecting link inside page which updating DB

  • Please log in to reply
1 reply to this topic

#1 solarisuser

  • Members
  • PipPipPip
  • Advanced Member
  • 122 posts

Posted 21 March 2006 - 07:12 PM

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?

#2 craygo

  • Staff Alumni
  • Advanced Member
  • 1,973 posts
  • LocationRhode Island

Posted 21 March 2006 - 08:43 PM

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.


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users