I got a database named file
a table named product has these fields:
id | name | sizes | price
1 | Shoe | 9,9.5,10 | 40.25

You can see in the sample record the field sizes. I want to display each sizes in a button, but I don't know how?

I already tried, but only 9 is inside the button, the rest are just plain text. Can anyone help me?

Recommended Answers

All 2 Replies

where is the code, post it here,
I think you need to wrap your value attribute of button with quotes

<input type=button name=btn1 id=btn1 value="<?php echo $sizes; ?>" >
Member Avatar for diafol

Are you sure you need a button. Buttons are supposed to be used with forms. Is this the setting? If not, you can use a link, styled to look like a button, e.g. css sprites.

As for quotes with attributes, I would. Otherwise XHTML validation will fail.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.