check box
Publicado por luis (1 intervención) el 20/09/2013 20:06:28
hola estoy haciendo una pagina web y necesito insertar varios check box a la base de datos usando mysql y php y estoy confindido para realizar esto.
html
y la base de datos
solo necesito que me guarde el estado bien sea 0 o 1
en la base de datos
si alguien me puede ayudar gracias
html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<form id = "formulario" name = "formulario" method = "post" action = "fin.php">
<label for = "opcionA" accessKey = "opcionA">A</label>
<input type = "checkbox" id = "opcionA" name = "opcionA" value = "A" />
<label for = "opcionB" accessKey = "opcionB">B</label>
<input type = "checkbox" id = "opcionB" name = "opcionB" value = "B" />
<label for = "opcionC" accessKey = "opcionC">C</label>
<input type = "checkbox" id = "opcionC" name = "opcionC" value = "C" />
<label for = "opcionD" accessKey = "opcionC">D</label>
<input type = "checkbox" id = "opcionD" name = "opcionDD" value = "D" />
<label for = "opcionE" accessKey = "opcionC">E</label>
<input type = "checkbox" id = "opcionE" name = "opcionE" value = "E" />
<label for = "opcionF" accessKey = "opcionF">F</label>
<input type = "checkbox" id = "opcionF" name = "opcionF" value = "F" />
<label for = "opcionG" accessKey = "opcionG">G</label>
<input type = "checkbox" id = "opcionC" name = "opcionC" value = "G" />
<label for = "opcionH" accessKey = "opcionH">H</label>
<input type = "checkbox" id = "opcionH" name = "opcionH" value = "H" />
<input type = "submit" id = "enviar" name = "enviar" value = "Enviar" />
</form>
y la base de datos
1
2
3
4
create table SCRIPT (
ESTADO varchar(20) not null,
primary key (NOMBRESCRIPT)
);
solo necesito que me guarde el estado bien sea 0 o 1
en la base de datos
si alguien me puede ayudar gracias
Valora esta pregunta


0