Jump to content


Photo

Entering Select Options Disabled True or False?


  • Please log in to reply
2 replies to this topic

#1 Heinz Stapff

Heinz Stapff

    Member

  • Member
  • PipPip
  • 80 posts
  • Gender:Male
  • Location:Riberas Del Pilar, Chapala, Jalisco, Mexico
  • Interests:Architecture, AutoCAD,
  • Main OS: Windows 8

Posted 25 July 2011 - 09:16 AM

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? :(

#2 megan

megan

    Support Team Member

  • Support Team
  • PipPip
  • 92 posts

Posted 25 July 2011 - 09:27 AM

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...ials/260-0.html

http://www.lynda.com...ials/282-0.html

http://www.vtc.com/p...5-Tutorials.htm

http://www.vtc.com/products/QuickStart!...5-Tutorials.htm

http://www.vtc.com/p...1-tutorials.htm

hth ~megan

#3 Heinz Stapff

Heinz Stapff

    Member

  • Member
  • PipPip
  • 80 posts
  • Gender:Male
  • Location:Riberas Del Pilar, Chapala, Jalisco, Mexico
  • Interests:Architecture, AutoCAD,
  • Main OS: Windows 8

Posted 26 July 2011 - 08:22 AM

megan
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:




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users