Tengo q grabar en un BD el contenido de lo marcado en los checkbox y no se como recibir los datos pasados
Aqui de dejo el codigo donde se cargan los juegos de registros y se arma una tabla dinamica con un campo para los checkbox
Código PHP:
Ver original
<?php require_once('../Connections/actualiza.php'); ?><?php } $MM_authorizedUsers = "2"; $MM_donotCheckaccess = "false"; // *** Restrict Access To Page: Grant or deny access to this page function isAuthorized($strUsers, $strGroups, $UserName, $UserGroup) { // For security, start by assuming the visitor is NOT authorized. $isValid = False; // When a visitor has logged into this site, the Session variable MM_Username set equal to their username. // Therefore, we know that a user is NOT logged in if that Session variable is blank. // Besides being logged in, you may restrict access to only certain users based on an ID established when they login. // Parse the strings into arrays. $isValid = true; } // Or, you may restrict access to only certain users based on their username. $isValid = true; } if (($strUsers == "") && false) { $isValid = true; } } return $isValid; } $MM_restrictGoTo = "../errorlog.php"; if (!((isset($_SESSION['MM_Username'])) && (isAuthorized("",$MM_authorizedUsers, $_SESSION['MM_Username'], $_SESSION['MM_UserGroup'])))) { $MM_qsChar = "?"; $MM_referrer = $_SERVER['PHP_SELF']; $MM_referrer .= "?" . $QUERY_STRING; exit; } ?> <?php $maxRows_Recordset1 = 40; $pageNum_Recordset1 = 0; $pageNum_Recordset1 = $_GET['pageNum_Recordset1']; } $startRow_Recordset1 = $pageNum_Recordset1 * $maxRows_Recordset1; $colname_Recordset1 = "-1"; $colname_Recordset1 = (get_magic_quotes_gpc()) ? $_SESSION['MM_Username'] : addslashes($_SESSION['MM_Username']); } $query_Recordset1 = sprintf("SELECT alumnos.Nro_legajo, alumnos.Carrera, materia.Cod_carrera, materia.cod_carrera1, materia.Nombre_materia FROM alumnos, materia WHERE Nro_legajo = '%s' and alumnos.Carrera=materia.cod_carrera1", $colname_Recordset1); $query_limit_Recordset1 = sprintf("%s LIMIT %d, %d", $query_Recordset1, $startRow_Recordset1, $maxRows_Recordset1); $totalRows_Recordset1 = $_GET['totalRows_Recordset1']; } else { } $maxRows_Recordset2 = 10; $pageNum_Recordset2 = 0; $pageNum_Recordset2 = $_GET['pageNum_Recordset2']; } $startRow_Recordset2 = $pageNum_Recordset2 * $maxRows_Recordset2; $colname_Recordset2 = "-1"; $colname_Recordset2 = (get_magic_quotes_gpc()) ? $_SESSION['MM_Username'] : addslashes($_SESSION['MM_Username']); } $query_Recordset2 = sprintf("SELECT Nro_legajo, Apellido, Nombre, Carrera, tipo_doc, Nro_doc FROM alumnos WHERE Nro_legajo = '%s'", $colname_Recordset2); $query_limit_Recordset2 = sprintf("%s LIMIT %d, %d", $query_Recordset2, $startRow_Recordset2, $maxRows_Recordset2); $totalRows_Recordset2 = $_GET['totalRows_Recordset2']; } else { } $queryString_Recordset2 = ""; foreach ($params as $param) { } } } } $queryString_Recordset2 = sprintf("&totalRows_Recordset2=%d%s", $totalRows_Recordset2, $queryString_Recordset2); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>A cursar</title> <style type="text/css"> <!-- .Estilo1 {font-size: 14px} .Estilo2 {font-size: 12px} --> </style> </head> <body> <h2 align="center">Nombre página </h2> <h3 align="center">Inscripción materias a cursar</h3> <table border="3" align="center"> <tr> <td><div align="center" class="Estilo1"> <h4>Nro legajo</h4> </div></td> <td><div align="center" class="Estilo1"> <h4>Apellido</h4> </div></td> <td><div align="center" class="Estilo1"> <h4>Nombre</h4> </div></td> <td><div align="center" class="Estilo1"> <h4>Carrera</h4> </div></td> <td><div align="center" class="Estilo1"> <h4>Tipo doc</h4> </div></td> <td><div align="center" class="Estilo1"> <h4>Nro doc</h4> </div></td> </tr> <?php do { ?> <tr> <td><h5 align="center" class="Estilo2"><?php echo $row_Recordset2['Nro_legajo']; ?></h5></td> <td><h5 align="center" class="Estilo2"><?php echo $row_Recordset2['Apellido']; ?></h5></td> <td><h5 align="center" class="Estilo2"><?php echo $row_Recordset2['Nombre']; ?></h5></td> <td><h5 align="center" class="Estilo2"><?php echo $row_Recordset2['Carrera']; ?></h5></td> <td><h5 align="center" class="Estilo2"><?php echo $row_Recordset2['tipo_doc']; ?></h5></td> <td><h5 align="center" class="Estilo2"><?php echo $row_Recordset2['Nro_doc']; ?></h5></td> </tr> </table> <form id="form2" name="form2" method="post" action="procesar.php"> <table width="392" border="3" align="center"> <tr> <td width="280"><div align="center"><strong>Materia</strong></div></td> <td width="92"><div align="center"><strong>Inscripción</strong></div></td> </tr> <?php do { ?> <tr> <td><div align="left"><?php echo $row_Recordset1['Nombre_materia']; ?></div></td> <td><label></label> <div align="center"> <label> [B][COLOR="Red"] <input <?php if (!(strcmp($row_Recordset1['Nombre_materia'],"Si"))) {echo "checked=\"checked\"";} ?> type="checkbox" name="checkbox2" value="checkbox" />[/COLOR][/B] </label> </div></td> </tr> </table> <p align="center"> <label> <input type="submit" name="Submit" value="Inscribir" /> </label> </p> <p align="center"> </p> </form> <p align="right"><strong>Firma del alumno </strong></p> <table width="200" border="0"> <tr> <th scope="col"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="100" height="22"> <param name="movie" value="button7.swf" /> <param name="quality" value="high" /> <embed src="button7.swf" quality="high" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="100" height="22" ></embed> </object></th> <th scope="col"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="100" height="22"> <param name="movie" value="button5.swf" /> <param name="quality" value="high" /> <embed src="button5.swf" quality="high" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="100" height="22" ></embed> </object></th> </tr> </table> <p align="left"> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </body> </html> <?php ?>
desde ya muchas gracias