I am creating an html form in Dreamweaver and it requires the user to select a color. Now I continued to work with a small widget browser and added a jquery widget to select the color that they had. My question, however, is how can I send this information to the sql database that I created. Another form of question will be what type of data will have color.
Thanks in advance!
Just use the varchar (6) field in your database and simple <input type="text" maxlength="6" size="6" />on your page.
<input type="text" maxlength="6" size="6" />
/ , , jQuery, " ". , , , . , , , 000000 , FFFFFF . .
.
, , , , , , . , , Javascript, , .
, .
sql , : http://blog.meta100.com/post/600571131/mcolorpicker
varchar (6).
EDIT: char (6).
script, . ajax (http://api.jquery.com/jQuery.ajax/). ?
Thanks to HTML5, you can simply use the new type of input field "color":
<input type="color" name="my_color" />
Form submission submits it as a hex color value (e.g. white = #ffffff)