this is my html form:
<form name="input" action="html_form_action.asp" method="get">
<input type="checkbox" id="mycheckbox">Don't show me again<br>
<input type="submit" id="Submit">
</form>
I have a table, is called: "mytable". this table contains: name(string), box(boolean).
I tried to do the next thing:
when the user checked the box of don't show me again
, I want to update the box of the table (assuming the row with id=6).
p.s. the box of the table inits to False.
so I have to do something like:
$("#submit").click(function() {
if($("#mycheckbox").is(':checked')) {
//here I have to update the table in the database
}
});
how can I do that?
I found examples with php but I don't want to do it with php.
UPDATE:
based on your answers, I want to do it with Ruby-on-rails.
I found this:
update_sql = "update mytable set box = TRUE where id = 6"
affected_rows = Job.connection.update(update_sql)
any help appreciated!