Hello, it's about a week that I'm searching for a simple script that do this:
So when value is 0 checkbox must be not checked and the opposite if value is 1...
So when I check box it must send value= 1 to my mysql DB and if it's not checked value must be 0 (Obviously when i press update button)
Please.. please .. I'm bagging you.. can some one provide me this simple script (complete with php html and sql info)
Here is simple example of what i have:
CREATE TABLE `NewTable` (
`id` smallint(4) NOT NULL AUTO_INCREMENT ,
`checked` tinyint(4) NOT NULL DEFAULT 0 ,
PRIMARY KEY (`id`)
)
;
This is HTML code:
<html><head></head><body>
<table>
</td><td><input type="checkbox" > I don't do drugs</td></tr>
</td><td><input type="checkbox" > I'm drun </td></tr>
</td><td><input type="checkbox" > Trolololo</td></tr> // On load page this have to be chacked (taked value = 1 from DB)
</table>
</body></html>
That's it :)
Have a great day. Artem Vorobiev