Hola mi problema es el siguiente:
Muestro mediante paginacion los video de una base de datos y debajo de cada video tengo un boton que al clickar te muestra el video en la misma página pero a mayor tamaño.
Los videos de la página inicial los muestra sin problemas, pero el los de la página siguiente al darle al botón para verlos en grande, me vuelve a la página inicial y me muestra en grande el video de la página inicial que está situado en la misma posición.
Alguien sabe por qué pasa y como solucionarlo??
Muchas gracias.
Aquí os dejo el código.
Código:
<!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=utf-8" />
<title>Documento sin título</title>
</head>
<body>
<p>
<?php
$videos= 4;
$pagina = $_GET['pag'];
if (empty($pagina)){$limite =0;}
else {$limite = $pagina * $videos;}
$consulta = mysql_query("SELECT url FROM corto ORDER BY url DESC LIMIT $limite,$videos");
$i=0;
$direccion= array();
$a=0;
while($datos = @mysql_fetch_array($consulta)){
$direccion[$i] = $datos[0];
$i++;
}
{
?>
<table width="50%" border="1">
<tr>
<td><?php echo "El autor es:..." ; ?></td>
<td><?php echo "El titulo es:..." ; ?></td>
</tr>
<tr>
<td><?php echo "El titulo es:..."; ?></td>
<td><?php echo "El titulo es:... ";?></td>
</tr>
<tr>
<td><object width="200" height="200">
<param name="movie" value="http://www.youtube.com/v/<?php echo $direccion[$a]; ?>=en">
</param>
<param name="wmode" value="transparent">
</param>
<embed src="http://www.youtube.com/v/<?php echo $direccion[$a]; $b= $a; $a++; ?>=en" type="application/x-shockwave-flash" wmode="transparent" width="200" height"200"></embed>
</object></td>
<td><object width="200" height="200">
<param name="movie" value="http://www.youtube.com/v/<?php echo $direccion[$a]; ?>=en">
</param>
<param name="wmode" value="transparent">
</param>
<embed src="http://www.youtube.com/v/<?php echo $direccion[$a]; $b = $a; $a++; ?>=en" type="application/x-shockwave-flash" wmode="transparent" width="200" height"200"></embed>
</object></td>
</tr>
<tr>
<td><form id="form1" name="form1" method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>">
<label>
<input type="submit" name="<?php $video = $a -2; print"video1"; ?>" id="<?php print"video1"; ?>" value="Ver Vídeo" />
</label><?php $video1= $direccion[$video];?>
</form> </td>
<td><form id="form2" name="form2" method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>">
<label>
<input type="submit" name="<?php $video = $video +1; print"video2"; ?>" id="<?php print "video2"; ?>" value="Ver Vídeo" />
</label><?php $video2= $direccion[$video];?>
</form> </td>
</tr>
<tr>
<td><?php echo "El titulo es:..."; ?></td>
<td><?php echo "El titulo es:... ";?></td>
</tr>
<tr>
<td><?php echo "El titulo es:..."; ?></td>
<td><?php echo "El titulo es:... ";?></td>
</tr>
<tr>
<td><object width="200" height="200">
<param name="movie" value="http://www.youtube.com/v/<?php echo $direccion[$a]; ?>=en">
</param>
<param name="wmode" value="transparent">
</param>
<embed src="http://www.youtube.com/v/<?php echo $direccion[$a]; $b= $a; $a++; ?>=en" type="application/x-shockwave-flash" wmode="transparent" width="200" height"200"></embed>
</object></td>
<td><object width="200" height="200">
<param name="movie" value="http://www.youtube.com/v/<?php echo $direccion[$a]; ?>=en" />
<param name="wmode" value="transparent" />
<embed src="http://www.youtube.com/v/<?php echo $direccion[$a];$b= $a; $a++; ?>=en" type="application/x-shockwave-flash" wmode="transparent" width="200" height"200"></embed>
</object>
</td>
</tr>
<tr>
<td><form id="form3" name="form3" method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>">
<label>
<input type="submit" name="<?php $video = $a -2; print"video3"; ?>" id="<?php print"video3"; ?>" value="Ver Vídeo" />
</label>
<?php $video3=$direccion[$video]; ?>
</form> </td>
<td><form id="form4" name="form4" method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>">
<label>
<input type="submit" name="<?php $video = $video +1; print "video4"; ?>" id="<?php print"video4";; ?>" value="Ver Vídeo" />
</label><?php $video4 = $direccion[$video];?>
</form> </td>
</tr>
</table>
<p>
<?php }
$inicio = 0;
$consulta = mysql_query("SELECT * FROM corto");
$cantidad = mysql_num_rows($consulta);
echo "paginas: " ;
echo "<a href='".$_SERVER["PHP_SELF"]."?cat=videos&pag=" . $inicio . "'>".$inicio."</a>";
for($i=1;$i<=$cantidad;$i++){
echo "<a href='".$_SERVER["PHP_SELF"]."?cat=videos&pag=" . $i . "'>".$i."</a>";
}
?>
</p>
<p> </p>
<table width="50%" border="1">
<tr>
<td><?php if (isset($_REQUEST['video1'])){ ?>
<object width="250" height="250">
<param name="movie" value="http://www.youtube.com/v/<?php print "$video1"; ?>=en" />
<param name="wmode" value="transparent" />
<embed src="http://www.youtube.com/v/<?php echo $video1; ?>=en" type="application/x-shockwave-flash" wmode="transparent" width="250" height"250"></embed>
</object>
<?php }
if (isset($_REQUEST['video2'])){ ?>
<object width="250" height="250">
<param name="movie" value="http://www.youtube.com/v/<?php echo $video2; ?>=en" />
<param name="wmode" value="transparent" />
<embed src="http://www.youtube.com/v/<?php echo $video2; ?>=en" type="application/x-shockwave-flash" wmode="transparent" width="250" height"250"></embed>
</object>
<?php }
if (isset($_REQUEST['video3'])){ ?>
<object width="250" height="250">
<param name="movie" value="http://www.youtube.com/v/<?php echo $video3; ?>=en" />
<param name="wmode" value="transparent" />
<embed src="http://www.youtube.com/v/<?php echo $video3; ?>=en" type="application/x-shockwave-flash" wmode="transparent" width="250" height"250"></embed>
</object>
<?php }
if (isset($_REQUEST['video4'])){ ?>
<object width="250" height="250">
<param name="movie" value="http://www.youtube.com/v/<?php echo $video4; ?>=en" />
<param name="wmode" value="transparent" />
<embed src="http://www.youtube.com/v/<?php echo $video4; ?>=en" type="application/x-shockwave-flash" wmode="transparent" width="250" height"250"></embed>
</object>
<?php }?></td>
</tr>
</table>
<p> </p>
</body>
</html>