Ver Mensaje Individual
  #3 (permalink)  
Antiguo 12/05/2009, 10:07
thi
 
Fecha de Ingreso: abril-2009
Mensajes: 244
Antigüedad: 15 años, 1 mes
Puntos: 0
Respuesta: Envio de datos en un enlace

Gracias por tu respuesta Ryo,

pero no se que estoy haciendo mal, pongo el codigo para ver donde estoy metiendo la pata(creo que es en la unión de codigo PHP con el Html.

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Catalogos</title>
<link href="../CSS/estilos_contenedor.css" rel="stylesheet" type="text/css" />
<script language="javascript">
var paramano = "jinv09";
var paramfolleto = "avyom";

// Recoger parametros con Javascript

function ObtenerP(pParametro){



//Capturamos la URL

var callingURL = document.location.href;



//Separamos los parametros

var cgiString = callingURL.substring(callingURL.indexOf('?')+1,cal lingURL.length);



// Dividimos mediante la función split los parámetros separados por ampersam

var col_array=cgiString.split("&");

var part_num=0;

var temp1;



while (part_num < col_array.length){

temp1 = col_array[part_num].split("=");

if ( temp1[0] == pParametro ){

return temp1[1];

}else

part_num+=1;

}



// evaluar que devolver cuando no lo

// encuentra...

return 0;

}

if (ObtenerP('ano') != 0){

paramano = ObtenerP('ano');
}
if (ObtenerP('folleto') != 0){

paramfolleto = ObtenerP('folleto');
}

function inicia(){

fresize();
}

function fresize(){

document.getElementById("catalogos_contenedor").st yle.height = document.body.clientHeight;
document.getElementById("catalogos_contenedor").st yle.width = document.body.clientWidth-208;
}


</script>

</head>

<body onResize="fresize();" onLoad="inicia();">
<table border="0" cellspacing="0" cellpadding="0" id="tabla_contenedor" >
<tr>
<td id="celda_navegador" valign="top" align="left" width="200px" >
<iframe id="datos_catalogo" name="datos_catalogo" src="datos_catalogo.html" frameborder="no" width="200"

scrolling="no" style="margin-left:0px;"></iframe>
</td>
<td width="2px" bgcolor="#999999"><img src="/imgages/logotipo avyom.jpg" width="2px"></td>
<td id="celda_folletos" valign="top" align="left" >
<?php
defined( '_VALID_MOS' ) or die( 'Restricted access' );
echo '<link rel="STYLESHEET" type="text/css" href="csstablas.css">';

$username = "root";
$password = "157a3F617";
$hostname = "localhost";
$dbh = mysql_connect($hostname, $username, $password)
or die("Error accediendo al servidor de base de datos");

$selected = mysql_select_db("avyom",$dbh)
or die("Error al acceder a la base de datos");

$query = "SELECT * FROM catalogos WHERE id=$_GET['id']";

$result = mysql_query($query);

while ($row = mysql_fetch_array($result,MYSQL_ASSOC))
{
while (list($key, $value) = each ($row))
{
if($value == "")
{
$row[$key] = "-";
}
}

print "<iframe id='catalogo' name='catalogo' src=/""$row['codigo_isuu']"/">Folleto Virtual ISSUU</iframe>";
}

mysql_close($dbh);
?>

</td>
</tr>
</table>

</body>
</html>