Jump to content

display value double drop downlist


hadiaruz

Recommended Posts

Hello,

 

I have a question regarding double dropdownlist. I have no problem in order to insert and save the data. the problem comes when on the update page, I would like to display again the value of the selected item, there is double value in the dropdown list. How to remove the double item in the drop down list ya?

 

 

 

Appreciate your prompt response on this matter as i need to submit my project as soon as possible.

 

 

 

Unit

--------

 



<?= $row['unit']?>
Unit 1
Unit 2
Unit 3
Unit 4
Unit 5
Unit 6
Unit 7
Unit 8







 

 

Officer

---------

 


Officer in Charge: 


       <?=$row['officer']?>




Link to comment
Share on other sites

  • 6 months later...

To be honest, I'm not completely sure I understand what you are trying to do.

 

If you are trying to set the dropdown so that the selected value is correct, here is what I have done in the past:

 


Please select
>Option 1
>Option 2
>Option 3

 

This assumes that I've set a PHP variable named "data" to hold the selected value. When I create the

 

Make sense?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  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.

Loading...
×
×
  • Create New...