Tema: Checkbox
Ver Mensaje Individual
  #10 (permalink)  
Antiguo 28/07/2005, 07:43
_Lobo_
 
Fecha de Ingreso: junio-2005
Mensajes: 111
Antigüedad: 18 años, 10 meses
Puntos: 0
gracias por tu ayuda!

Ok vamos por partes send.php seria asi?

Código PHP:
<?php
// Set up connection to MySQL
$host "localhost";
$user "root";
$pwd "root";
$dbConn mysql_connect($host,$user,$pwd);
// Connect to newland_tours database
$database "newland_tours";
mysql_select_db($database);
$query_rs_insertCountry "INSERT INTO tbl_instructores (
miCheckBox[1],
miCheckBox[2],
miCheckBox[3],
miCheckBox[4],
miCheckBox[5]) 
VALUES
('"
$_POST['miCheckBox'][1]."',
'"
$_POST['miCheckBox'][2]."',
'"
$_POST['miCheckBox'][3]."',
'"
$_POST['miCheckBox'][4]."',
'"
$_POST['miCheckBox'][5]."'
);"
;

for (
$i=1i<=5i++) {
// Compruevas el valor
if (!empty($_POST['miCheckBox'][i]) { // es decir, si tiene valor
// Introduces el valor en la BBD
} else {
//Quizás quieres guardar que no ha marcado. COMO ? 
}
}

$rs_insertCountry mysql_query($query_rs_insertCountry);
header("Location: administration.php");
?>
ya que me esta dando errores