Jump to content

extracting information from a mysql table


chrisjwebb1978

Recommended Posts

HI all I have a page that allow individuals to use a select drop down box to choose from a number of items for an invoice. What i would like to happen, is when an item from the list is chosen, the current number in stock generates in a disabled text box to the right. This obviously needs to happen before form submission, but i am a newbie at javascript and need to have it work alongside php. Any guidance is appreciated.

Link to comment
Share on other sites

The simplest way is to add a hidden input that will hold that value, give the input an id, target that id with an event attached to the form, and change it with getElementById(). EDIT: You can store the item's value in $_SESSION instead of a table.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...