Heinz Stapff Posted July 25, 2011 Report Share Posted July 25, 2011 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 optionsColumn:CAble Enum: 'False','True','True','True' produces error disabled= for all optionsColumn:Cval Enum: 'Silver','Gold','White Gold','Platinum' value= for all optionsColumn:Color Enum: 'Silver','Gold','White Gold','Platinum' Text for all options sugested on webColumn: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. 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? Quote Link to comment Share on other sites More sharing options...
megan Posted July 25, 2011 Report Share Posted July 25, 2011 that looks like PHP not SQL and I've heard google is really good for looking up information on stuff other possible resources you might find helpful http://www.lynda.com/MySQL-training-tutorials/260-0.html http://www.lynda.com/PHP-training-tutorials/282-0.html http://www.vtc.com/products/Real-World-Pro...5-Tutorials.htm http://www.vtc.com/products/QuickStart!...5-Tutorials.htm http://www.vtc.com/products/MySQL-5-Develo...1-tutorials.htm hth ~megan Quote Link to comment Share on other sites More sharing options...
Heinz Stapff Posted July 26, 2011 Author Report Share Posted July 26, 2011 meganIt 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. Quote Link to comment Share on other sites More sharing options...
data3ri Posted January 20, 2020 Report Share Posted January 20, 2020 Google is really good and definitly will give solution about things Other helping site is at PHP Training in pune Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.