Ver Mensaje Individual
  #4 (permalink)  
Antiguo 05/11/2010, 18:05
Eslava86
 
Fecha de Ingreso: noviembre-2010
Mensajes: 4
Antigüedad: 13 años, 6 meses
Puntos: 0
Respuesta: Checkbox que se borran

Hola, muchas gracias por contestar y la verdad es que mucho no lo he entendido, debido a que soy totalmente novato, es mi primera página web, la verdad es que de buenas a primeras el código parece un poco raro, voy a ponerlo sin el php, que creo que no lo he hecho correctamente.

Código:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
		<title>Olivereta United.tk</title>
		<link href="style.css" rel="stylesheet" type="text/css" media="all"/>
	</head>
<body>
	<div id="container">
		<div id="main-title"><span style="font-weight: 400"><font face="Arial Black" style="font-size: 9"><span style="font-weight: 400">Olivereta United</span></font></span></div>
		<div id="header-image"></div>
		<div id="navbar">
			<font face="Arial Black" style="font-size: 9">
			<a href="Equipo.html"><span style="font-weight: 400">Equipo</span></a><span style="font-weight: 400"> ||
			</span>
            <a href="Contacto.html"><span style="font-weight: 400">Contacto</span></a><span style="font-weight: 400"> ||
                </span>
            <a href="Proximo partido.html"><span style="font-weight: 400">Próximo partido</span></a></font></div>
      			<div id="body">
     			<h1><font face="Arial">Viernes, 05/11/2010</font></h1>
			<form id="form1" action="mantener_checkbox.php" method="post">
			<div id="main-text">
            <title></title>
            <title></title>
              <p class="byline">&nbsp;</p>
              <p>&nbsp;</p>
            <table width="400" border="0" align="center">
              <tr>
                <td width="200" rowspan="2" align="center" bgcolor="#999999">Jugadores</td>
                <td colspan="2" align="center" bgcolor="#999999">Asistencia</td>
              </tr>
              <tr>
                <td width="100" align="center" bgcolor="#CCCCCC">Si</td>
                <td width="100" align="center" bgcolor="#CCCCCC">No</td>
              </tr>
              <tr>
                <td width="200" align="center" bgcolor="#CCCCCC">Nacho</td>
                <td align="center" bgcolor="#CCCCCC"><input type="checkbox" name="checkbox" id="checkbox" /></td>
                <td align="center" bgcolor="#CCCCCC"><input type="checkbox" name="checkbox2" id="checkbox2" /></td>
              </tr>
              <tr>
                <td width="200" align="center">Joaquin</td>
                <td align="center"><input type="checkbox" name="checkbox4" id="checkbox4" /></td>
                <td align="center"><input type="checkbox" name="checkbox6" id="checkbox6" /></td>
              </tr>
              <tr bgcolor="#CCCCCC">
                <td width="200" align="center">Alejandro</td>
                <td align="center"><input type="checkbox" name="checkbox4" id="checkbox4" /></td>
                <td align="center"><input type="checkbox" name="checkbox3" id="checkbox3" /></td>
              </tr>
            </table>
            <p class="byline">&nbsp;</p>
            <input type="submit" name="Procesar" value="Confirmar" />
            <p class="left">&nbsp;</p>
<p class="byline">&nbsp;</p>
<div id="footer">
  <div> <font face="Arial Black" class="current">Designed by <a href="http://www.f8d.net">f8d</a>, modificated by Marcos Eslava</font></div>
			  </div>
			</div>
		</div>
	</div>
	</body>
</html>
Luego creo que tendría que crear un código php en otro archivo para que de la información que mi intento es:

Código:
<?php
     if (isset($_POST['expediente']))
     {
         foreach ($_POST['expediente'] as $expediente_s)
             if ($expediente_s == 1){
if (!isset($_POST['Procesar'])){
echo "<h2>Se hizo submit con Checkbox nº 1</h2>";
}

}else{
echo "también se marcó el CheckBox nº $expediente_s <br />";
}
     }
if (isset($_POST['Procesar'])){
echo "<h2>Se hizo submit con Boton</h2>";
}
La verdad es que cualquier ayuda me sirve, gracias de antemano.