Jump to content

Drop Down Box Help


Ell20

Recommended Posts

Hi,

 

I have a couple of drop down boxes which you select the option you want, that value is then stored in the database.

If you make a mistake there is an edit option which once clicked shows the form with the information filled in/selected.

 

However my problem is that when you edit, although the current option which was previously entered into the drop down box is set as the starting value, which is disabled, if you dont change the drop down box the value is deleted rather than held as it hasnt changed.

 

I hope this makes sense, but here is some snippets of the code to try and explain what im talking about:

 

Drop down box code:
<select name="by2"><option value='' selected disabled>
<?php if(isset($wr)) {?> 
<?=$wr?> 
<?php } 
if ($wr == "") { 
echo 'Wickets/Runs';
}
?>
</option>
<option value="Wickets">Wickets</option>
<option value="Runs">Runs</option>

 

Thanks for your help

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.