Jump to content
The Uniform Server Community

Entering Select Options Disabled True or False?

Heinz Stapff

Recommended Posts

I want to controll Selected=, Disabled=, title= for each Option in a select tag. The sql looking like this


echo "<option selected='".$row['Csel','0']."'value='".$row['Cval','0']."' disabled='" .$row['CAble','0']."'>".$row['Color','0']."</option>";
echo "<option selected='".$row['Csel','1']."'value='".$row['Cval','1']."' disabled='" .$row['CAble','1']."'>".$row['Color','1']."</option>";
echo "<option selected='".$row['Csel','2']."'value='".$row['Cval','2']."' disabled='" .$row['CAble','2']."'>".$row['Color','2']."</option>";
echo "<option selected='".$row['Csel','3']."'value='".$row['Cval','3']."' disabled='" .$row['CAble','3']."'>".$row['Color','3']."</option>";
echo "<option selected='".$row['Csel','4']."'value='".$row['Cval','4']."' disabled='" .$row['CAble','4']."'>".$row['Color','4']."</option></select><br/><br/>";


Column:Csel Enum: 'True','False','False','False' produces error selected= for all options

Column:CAble Enum: 'False','True','True','True' produces error disabled= for all options

Column:Cval Enum: 'Silver','Gold','White Gold','Platinum' value= for all options

Column:Color Enum: 'Silver','Gold','White Gold','Platinum' Text for all options


sugested on web

Column:Csel; Type:Tinyint; Enum:'0','1','1','1' Atributes:unsigned?

I was thinking Enum:'Yes','No','No','No' with Type:Text or varchar( ) but can't see that selected='Yes' or selected='No' works in HTML, would be nice but there are one too many geniuses involved. The idea is to control all options from one column/field.

Column:Ctitle; Type:Varch(10); Enum:'5% Discount','6% Discount','8% Discount','15% Discount'

Like to know what works. :blink: Have saved most columns/fields varchar() blank but need to change to test the php page.


Any help greatly appreciated.

PS. megan, the Mastering phpMyAdmin.pdf is very skimpy on the Attributes:Unsigned etc; mysql input for fields and uses the term through out without addressing the input and it's elements at all? :(

Link to comment
Share on other sites

Link to comment
Share on other sites


It is actually a phpMyAdmin question, thanks for the response will check the links out. Again, I thought that 'Mastering phpMyAdmin, did not address the Attributes field itself and infact did not address others and their elements. I had to go back to HTML web search w3.school to find the answer.


select options HTML disabled = "disabled" Dom and disabled = "true/false" for ie6 actually can be written without the '=' equals sign like so


< option disabled > Go Figure </option>//it works

< option selected > Go Figure, it works to </option>


How it applies to php?


echo "<option " . $row['Disabled(Enum field name)','0(from Enum field in phpMyAdmin?)'] . "> Go Figure </option>";
echo "<option " . $row['Selected(Enum field name)','0(from Enum field in phpMyAdmin?)'] . "> Go Figure </option>";


Entering the Enum field attributes can be confussing because the word 'attributes' should be 'elements' so entering the 'elements for the Attribute field' could be addressed?


'STARTING phpMyAdmin' would be a better title but they would have failed in that they never cover the complete list of inputs in phMyAdmin. Or the 'elements' for each. :rolleyes:

Link to comment
Share on other sites

  • 8 years later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

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.


  • Create New...