enviar variables con checkbox
Hola
es problema es algo complicado, resulta que tengo una pagina que consulta las peliculas disponibles para alquilar que esta asi:
<html>
<Head>
<title>prueba</title>
</head>
<Body>
<form method="POST" action="otra.php">
<table border="1">
<tr>
<td width="2%" Height="11">Genero</td>
<td width="1%" Height="11">Codigo</td>
<td width="3%" Height="11">Pelicula</td>
<td width="1%" Height="11">Formato</td>
<td width="1%" Height="11">Valor</td>
<td width="1%" Height="11">Alquilar</td>
</tr>
<?php
$nom=$row["Nombre"];
mysql_connect("localhost","nobody");
$result1=mysql_db_query("videot","select Peliculas.Disponible,Peliculas.Nom_pel,Peliculas.Cod_pel,Generos.Nom_gen, Formatos.Nom_for,Formatos.Val_alq from Peliculas,Generos,Formatos where Generos.Id_gen = Peliculas.Id_gen And Formatos.Id_for = Peliculas.Id_for And Peliculas.Disponible = 'si' ");
while ($row=mysql_fetch_array($result1))
{
?>
<tr>
<td width="2%" Height="11"><? echo $row["Nom_gen"]?></td>
<td width="1%" Height="11"><? echo $row["Cod_pel"]?></td>
<td width="3%" Height="11"><? echo $row["Nom_pel"]?></td>
<td width="1%" Height="11"><? echo $row["Nom_for"]?></td>
<td width="1%" Height="11"><? echo $row["Val_alq"]?></td>
<td><p><input type="checkbox" name="alq" value="ON"></p></td>
</tr>
<tr><br></tr>
<?
}
?>
</table>
<p> </p>
<center>Cheque la pelicula que desea Solicitar </center>
</form>
</body>
</htm>
Yo quiero que cuando seleccionen el checkbox me guarde el codigo esa pelicula en una variable, para poder descargarla, y que ademas esa pelicula me la muestre en otra pagina.
PD: No se como preguntar si el objeto esta checked, ademas supon que tengo miles de peliculas
De antemano muchas gracias.
es problema es algo complicado, resulta que tengo una pagina que consulta las peliculas disponibles para alquilar que esta asi:
<html>
<Head>
<title>prueba</title>
</head>
<Body>
<form method="POST" action="otra.php">
<table border="1">
<tr>
<td width="2%" Height="11">Genero</td>
<td width="1%" Height="11">Codigo</td>
<td width="3%" Height="11">Pelicula</td>
<td width="1%" Height="11">Formato</td>
<td width="1%" Height="11">Valor</td>
<td width="1%" Height="11">Alquilar</td>
</tr>
<?php
$nom=$row["Nombre"];
mysql_connect("localhost","nobody");
$result1=mysql_db_query("videot","select Peliculas.Disponible,Peliculas.Nom_pel,Peliculas.Cod_pel,Generos.Nom_gen, Formatos.Nom_for,Formatos.Val_alq from Peliculas,Generos,Formatos where Generos.Id_gen = Peliculas.Id_gen And Formatos.Id_for = Peliculas.Id_for And Peliculas.Disponible = 'si' ");
while ($row=mysql_fetch_array($result1))
{
?>
<tr>
<td width="2%" Height="11"><? echo $row["Nom_gen"]?></td>
<td width="1%" Height="11"><? echo $row["Cod_pel"]?></td>
<td width="3%" Height="11"><? echo $row["Nom_pel"]?></td>
<td width="1%" Height="11"><? echo $row["Nom_for"]?></td>
<td width="1%" Height="11"><? echo $row["Val_alq"]?></td>
<td><p><input type="checkbox" name="alq" value="ON"></p></td>
</tr>
<tr><br></tr>
<?
}
?>
</table>
<p> </p>
<center>Cheque la pelicula que desea Solicitar </center>
</form>
</body>
</htm>
Yo quiero que cuando seleccionen el checkbox me guarde el codigo esa pelicula en una variable, para poder descargarla, y que ademas esa pelicula me la muestre en otra pagina.
PD: No se como preguntar si el objeto esta checked, ademas supon que tengo miles de peliculas
De antemano muchas gracias.
