Foros del Web » Creando para Internet » HTML »

[SOLUCIONADO] mysql-php-css Web problem

Estas en el tema de mysql-php-css Web problem en el foro de HTML en Foros del Web. Antes que nada disculparme porque no conozco la manera de colacar las dudas en uno u otro tema. El problema es que cree una web ...
  #1 (permalink)  
Antiguo 18/05/2013, 05:35
 
Fecha de Ingreso: mayo-2013
Mensajes: 3
Antigüedad: 11 años
Puntos: 0
Información mysql-php-css Web problem

Antes que nada disculparme porque no conozco la manera de colacar las dudas en uno u otro tema.
El problema es que cree una web que lee de una base de datos mysql los enlaces y contenidos que va a tener la web,explorer lo consigue pero los demas exploradores no.
esta es la direccion: http://revilla.sytes.net/index6.php

el codigo de la web es:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" type="text/css" href="mystyle2.css">
<title>Alberto Revilla Php Web</title>
<style type="text/css">

</style>
</head>

<body>


<div id="img1" align="left"> <img src="dividerart.jpg" alt="leftlogo" width="10%" height="100%" align="left"> </div>
<div id="img2" align="right"> <img src="dividerart2.jpg" alt="leftlogo" width="10%" height="100%" align="right"> </div>
<div id="title">
<table width="100%" height="100%" border="0">
<tr>
<td width="94%" height="100%" ><H1>Alberto Revilla Php Web</H1>
</td>
<td width="6%">
<img src="yo3gif.gif" width="50px" align="right"/>
</td>
</tr>
</table>
</div>
<div id="sections">
<?php
$a=NULL;
if($a=mysql_connect('localhost','root','Pas.Root') )
{
//echo "Ok";
mysql_select_db("index4",$a);
$resultado = mysql_query("SELECT * FROM linkspanish");
if (!$resultado) {
echo 'No se pudo ejecutar la consulta: ' . mysql_error();
exit;}
else{
if(mysql_num_rows($resultado)!=0){
$cont=mysql_num_rows($resultado);
//echo $cont;
$indice=0;
echo '<table width="100%" border="0" > <tr>';
while ($cont){
//echo $indice;
echo '<td background="./images/tableback.jpg"> ';
//echo '<td background="./images/dividerart.jpg"> ';
$string= mysql_fetch_array($resultado);
echo '<a href="'.$string[1].'">'.$string[0].'</a>';
echo '</td>';
$indice++;
$cont--;
}
echo '</tr>';
echo '</table>';
}
}
mysql_close($a);
}
else{ echo "no_conected";}
?>
</div>
<div id="contenido">

<?php

$b=NULL;
if($b=mysql_connect('localhost','root','Pas.Root') )
{
//echo "Ok";
mysql_select_db("index4",$b);
$resultado2 = mysql_query("SELECT * FROM linkspanish");
if (!$resultado2) {
echo 'No se pudo ejecutar la consulta: ' . mysql_error();
exit;}
else{
if(mysql_num_rows($resultado2)!=0){
$cont2=mysql_num_rows($resultado2);
//echo $cont2;
$indice2=0;
while ($cont2){
//echo $indice2;
echo '<div id="';
$string2= mysql_fetch_array($resultado2);
echo $string2[1].'" class="marco"> <p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p>';
$contenido= "$string2[2]";
$contenido=chop($contenido);
//echo $contenido;
if ($file = fopen("$contenido", "r"))
{
while(!feof($file)) { echo fgets($file); } fclose($file);
}
else
{
echo("Unable to open file!");
}
echo '</div>';
$indice2++;
$cont2--;
}
}
}
mysql_close($b);
}
else{ echo "no_conected";}
?>
</div>

<div id="cola">
<HR>
<IMG SRC="apache_pb.gif" height="25px" ALT="">
<IMG SRC="phplogo-highres.png" height="25px" ALT="">
<IMG SRC="logo-mysql.png" height="25px" ALT=""> </div>

</body>
</html>




y el del css:
hr {color: #0000FF; width:inherit;}
p {margin-left:20px;}
body {background-image:url("back01.bmp");}
html { font: bold 14px arial,helvetica,sans-serif; }
h1 { text-align: left; color:#000000; }
h2 { text-align: center; color: #777; }
ul { list-style:none; color: #888; }
ul li a { color: #888; text-decoration:none; font-weight: bold; }
ul li a:hover { color: #f00; }
p { color: #456; }

a{color:#000000;}
a:hover { color: #f00; }

/* Capas del ejemplo */

div#img1 {
position: absolute;
left: 0px; top: 0px;
width:50%; height:100%; /* height:932px;*/
z-index:1; }
div#img2 {
position: absolute;
right: 0px; top: 0px;
width:50%; height:100%;
z-index:1; }
div#title {
position: absolute;
height: 70px;
width:80%;
z-index:3;
font: bold 14px arial,helvetica,sans-serif;
left: 10%;
top: 2px;
}/*height: 10%;width:956px;*/

div#sections {
background-color:#60A6FB;
position:absolute;
top: 73px;/*top: 73px;*/
left: 10%;
height: 25px;
width:80%;
z-index:3;
}/*right:10px; left: 119px; width:80%; height: 20%;*/
div#contenido {
position:absolute;
left:10%; top:0px; /* top:29px;*/
width:80%; height:785px; /* height:778px;*/
z-index:2;
overflow:hidden;}

.marco {
position:relative;
height:100%; width:100%;
overflow:hidden;z-index:3;
}

div#cola {
position:fixed;
left: 0%; bottom:5px;
width:100%; height:40px;
z-index:4;}



/*
div#marco1, div#marco2, div#marco3{
position:relative;
height:100%; width:100%;
overflow:hidden; z-index:3;}
*/


perdon por los comentarios sin eliminar y las propiedades css que no se aplican a ningun tag


al ver el codigo fuente en el explorador todo parece correcto,mas que tema de tags debe ser css o que los exploradores no tienen iformacion de las dimensiones de los objetos debido a que aun el php script no los creo.Intente evitar esto dando las dimensiones en px en vex de en %

P.D: Me podriais aconsejar alguna alternativa a Dreamweaver que merezca la pena para cambiarlo, algo con debbuggers para php o avisos de etiquetas sin cerrar,...
  #2 (permalink)  
Antiguo 18/05/2013, 05:44
 
Fecha de Ingreso: mayo-2013
Mensajes: 3
Antigüedad: 11 años
Puntos: 0
Respuesta: mysql-php-css Web problem

Mas informacion:
He probado a quitar los archivos txt,de modo que evito que el fallo no venga al cargar los txt, pero sigue igual.los link no me redirigen al marco o los marcos no son visualizados correctamente:
esta es la pagina web a "semi-huevo", sin automatizar la creacion de divs
http://revilla.sytes.net/index4.php

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" type="text/css" href="mystyle3.css">
<title>Alberto Revilla Php Web</title>
<style type="text/css">

</style>
</head>

<body>


<div id="img1" align="left"> <img src="dividerart.jpg" alt="leftlogo" width="10%" height="100%" align="left"> </div>
<div id="img2" align="right"> <img src="dividerart2.jpg" alt="leftlogo" width="10%" height="100%" align="right"> </div>
<div id="title">
<table width="100%" height="100%" border="0">
<tr>
<td width="94%" height="100%" ><H1>Alberto Revilla Php Web</H1>
</td>
<td width="6%">
<img src="yo3gif.gif" width="50px" align="right"/>
</td>
</tr>
</table>
</div>
<div id="sections">
<?php
$a=NULL;
if($a=mysql_connect('localhost','root','Pas.Root') )
{
//echo "Ok";
mysql_select_db("index4",$a);
$resultado = mysql_query("SELECT * FROM linkspanish");
if (!$resultado) {
echo 'No se pudo ejecutar la consulta: ' . mysql_error();
exit;}
else{
if(mysql_num_rows($resultado)!=0){
$cont=mysql_num_rows($resultado);
//echo $cont;
$indice=0;
echo '<table width="100%" border="0" > <tr>';
while ($cont){
//echo $indice;
echo '<td background="./images/tableback.jpg"> ';
//echo '<td background="./images/dividerart.jpg"> ';
$string= mysql_fetch_array($resultado);
echo '<a href="'.$string[1].'">'.$string[0].'</a>';
echo '</td>';
$indice++;
$cont--;
}
echo '</tr>';
echo '</table>';
}
}
mysql_close($a);
}
else{ echo "no_conected";}
?>
</div>
<div id="contenido">
<div id="marco1">
<p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p>

<?php
$file = fopen("Contenido1.txt", "r") or exit("Unable to open file!");
while(!feof($file)) { echo fgets($file); } fclose($file);
?>

</div>
<div id="marco2">
<p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p>

<?php
$file = fopen("Contenido2.txt", "r") or exit("Unable to open file!");
while(!feof($file)) { echo fgets($file); } fclose($file);
?>

</div>
<div id="marco3">
<p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p>

<?php
$file = fopen("Contenido3.txt", "r") or exit("Unable to open file!");
while(!feof($file)) { echo fgets($file); } fclose($file);
?>

</div>
<div id="marco4">
<p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p>

<?php
$file = fopen("Contenido4.txt", "r") or exit("Unable to open file!");
while(!feof($file)) { echo fgets($file); } fclose($file);
?>
</div>
<div id="marco5">
<p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p>

<?php
$file = fopen("Contenido5.txt", "r") or exit("Unable to open file!");
while(!feof($file)) { echo fgets($file); } fclose($file);
?>
</div>
</div>
<div id="cola">
<HR>
<IMG SRC="apache_pb.gif" height="25px" ALT="">
<IMG SRC="phplogo-highres.png" height="25px" ALT="">
<IMG SRC="logo-mysql.png" height="25px" ALT="">
</div>
</body>
</html>


y este su css

hr {color: #0000FF; width:inherit;}
p {margin-left:20px;}
body {background-image:url("back01.bmp");}
html { font: bold 14px arial,helvetica,sans-serif; }
h1 { text-align: left; color:#000000; }
h2 { text-align: center; color: #777; }
ul { list-style:none; color: #888; }
ul li a { color: #888; text-decoration:none; font-weight: bold; }
ul li a:hover { color: #f00; }
p { color: #456; }

a{color:#000000;}
a:hover { color: #f00; }

/* Capas del ejemplo */

div#img1 {
position: absolute;
left: 0px; top: 0px;
width:50%; height:100%; /* height:932px;*/
z-index:1; }
div#img2 {
position: absolute;
right: 0px; top: 0px;
width:50%; height:100%;
z-index:1; }
div#title {
position: absolute;
height: 70px;
width:80%;
z-index:3;
font: bold 14px arial,helvetica,sans-serif;
left: 10%;
top: 2px;
}/*height: 10%;width:956px;*/

div#sections {
background-color:#60A6FB;
position:absolute;
top: 73px;/*top: 73px;*/
left: 10%;
height: 25px;
width:80%;
z-index:3;
}/*right:10px; left: 119px; width:80%; height: 20%;*/
div#contenido {
position:absolute;
left:10%; top:0px; /* top:29px;*/
width:80%; height:785px; /* height:778px;*/
z-index:2;
overflow:hidden;}
div#cola {
position:fixed;
left: 0%; bottom:5px;
width:100%; height:40px;
z-index:4;}
div#marco1, div#marco2, div#marco3, div#marco4, div#marco5{
position:relative;
height:100%; width:100%;
overflow:hidden; z-index:3;}



Agradezco hasta qu solo lo miren,jeje
Si quieren mas info solo pregunten
  #3 (permalink)  
Antiguo 18/05/2013, 16:27
 
Fecha de Ingreso: mayo-2013
Mensajes: 3
Antigüedad: 11 años
Puntos: 0
Respuesta: mysql-php-css Web problem

Perdon, pero a la hora de automatizar no me di cuenta que los campos del link de mi base de datos empezaban con #, la quite y a funcionar.Espero no haberle roto a nadie la sesera.
Gracias de todas formas!!!!
Y no critiqueis mi web que las chapuzas ya las veo,q fui yo el que las puso ahi,jeje.
Hombre,si son constructivas criticad,criticad XD.
El sistema me parece guay,para estar aprendiendo no esta nada mal.
Explorer se tragaba los # sin problema.
He cambiado los nombre de las paginas asi que los links q puse no funcionaran.
La direccion es revilla.sytes.net, pero dejarme arreglar un poco la cosilla y ahi os muestro el codigo, base de datos y el css.
Gracias de nuevo por si acaso alguien le dio al coco y mil perdones!!!!!!!!!!!!
Hasta la proxima duda!

Etiquetas: css, link, php, problem, select
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 18:09.