swbradbury
MIS
I’m having a problem-using drop down menus on a form to edit existing data in a MySQL database… Any help on this would be appreciated. My desk is beginning to get a groove in it from where I’ve been banging my head on it.
Here’s a short version of where I’m at now…
When we hire a new employee for the company we set in motion a form so that we can better track and acquire any technologies they may require to do the job. We “pass” this form on to each other, as one person needs to fill in one section of the form, another person fills in the next, etc…On the form I have the equipment we supply (cell phone, beeper, laptop, etc…) and a “Yes/No” drop down menu after each item so that we know what they need. And this is where my problem begins.
I.e. – Person “A” has completed their part of the form and when person “B” goes to make their entries, they notice a mistake in person “A’s” section… If person “B” tries to change the value, it will allow them to change it in the drop down menu but when they hit the “Submit” it never takes the new value and applies the change in the database.
Here is a snippet of the code I’ve been attempting to get to work… The end result was supposed to be that it would pull the existing data from the database and display it, while giving the options of the original drop down menu. (Laugh where you feel necessary)
<SELECT name="beeper">
<OPTION value="<?php echo $beeper ?>" selected><?php echo $beeper ?>
<OPTION value="Yes">Yes
<OPTION value="No">No
This successfully pulls back the existing data in the database, stating whether or not the person should have a beeper, and displays it. It also gives them the YES/NO options I want them to have but this does not update the database with the option they have selected if they change it from the existing value.
Anyone have any ideas as to what I need to do to get around this?
Thanks,
SWBradbury
Here’s a short version of where I’m at now…
When we hire a new employee for the company we set in motion a form so that we can better track and acquire any technologies they may require to do the job. We “pass” this form on to each other, as one person needs to fill in one section of the form, another person fills in the next, etc…On the form I have the equipment we supply (cell phone, beeper, laptop, etc…) and a “Yes/No” drop down menu after each item so that we know what they need. And this is where my problem begins.
I.e. – Person “A” has completed their part of the form and when person “B” goes to make their entries, they notice a mistake in person “A’s” section… If person “B” tries to change the value, it will allow them to change it in the drop down menu but when they hit the “Submit” it never takes the new value and applies the change in the database.
Here is a snippet of the code I’ve been attempting to get to work… The end result was supposed to be that it would pull the existing data from the database and display it, while giving the options of the original drop down menu. (Laugh where you feel necessary)
<SELECT name="beeper">
<OPTION value="<?php echo $beeper ?>" selected><?php echo $beeper ?>
<OPTION value="Yes">Yes
<OPTION value="No">No
This successfully pulls back the existing data in the database, stating whether or not the person should have a beeper, and displays it. It also gives them the YES/NO options I want them to have but this does not update the database with the option they have selected if they change it from the existing value.
Anyone have any ideas as to what I need to do to get around this?
Thanks,
SWBradbury