Jump to content

[SOLVED] Editing via a form populated from MySQL: How do I have the select menu selected?


suttercain

Recommended Posts

Hi guys,

 

I built a small admin panel that allows the user to submit data, via a form. One field is a select menu (html populated). Now when they try to edit the record the form is displayed with the content already filled in to allow editing. But the select menu always goes to the first select. Is there a way to have the select menu already selected to the value from the MySQL row?

 

EXP

Column State will always be CA, AZ or NV. If the record has a value of NV, how do I have that show in the select menu when the user goes to edit the record, with also allowing them to change it to either CA or AZ?

 

Thanks.

 

SC

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.