Ver Mensaje Individual
  #1 (permalink)  
Antiguo 07/11/2009, 20:34
flashtkd
 
Fecha de Ingreso: agosto-2008
Mensajes: 587
Antigüedad: 15 años, 9 meses
Puntos: 6
Update con checkbox y boton

Como puedo actualizar un dato, usando checkbox al presionar un boton ?

el checkbox tiene el valor= 10

Código PHP:
<?php

$query
="update Usuarios set region = $checkbox
whe nombre = 'spider'
"
;

mysql_query($query,$link);

echo
"
<table action="
mipagina.php" method="get">
<input type='checkbox' name='checkbox' value='10'>
<input type='submit' value='- actualizar-'
</table>
"
;

?>