Hola chicos:
Estoy aprendiendo o al menos estoy intentando aprender a usar php y actualmente me encuentro trabajando haciendo un catalogo online
El caso es que he creado un par de bases de datos en mysql
y he creado un par de ficheros en php
El primero es este
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head>
<link rel="stylesheet" href="text.css" type="text/css" media="all">
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
<meta http-equiv="Page-Enter" content="RevealTrans (Duration=3, Transition=12)">
<meta http-equiv="Page-Enter" content="RevealTrans (Duration=3, Transition=12)">
<title>Catalogo Celea</title>
</head>
<body topmargin="0" leftmargin="0" text="" bgcolor="" marginheight="0" marginwidth="0">
<div id="content">
<div id="cabecera">
<a href="index.html"><img alt="Logotipo (40K)" src="objetos/logotipo.bmp"></a>
</div>
<div id="navegacion">
<ul>
<div align="center">
<table class="ancho80" width="100%" border="0" cellpadding="00" cellspacing="0">
<tbody>
<tr>
<td class="a2"><p><font color=white >></font><font type="Aircraft regular">Registro: ACCESO</font></p></td>
<td class="a3"><p><b><a href="http://www.celea.es/asociados.php">ASOCIADOS</a> /<a href="http://www.celea.es/clientes.php">CLIENTES</a></b></p></td>
<td class="a4"><p><a href="http://www.celea.es/productos.php">PRODUCTOS</a></p></td>
<td class="a5"><p><a href="http://www.celea.es/contactar.php">CONTACTO</a></p></td>
</tr>
</tbody>
</table>
</div>
</ul>
</div>
<?php
mysql_connect('servidor', 'usuario','contraseña')or die ('Ha fallado la conexión: '.mysql_error());
mysql_select_db('basededatos')or die ('Error al seleccionar la Base de Datos: '.mysql_error());
mysql_select_db("lakuak");
?>
<div class="otro">
<div class="nuevo">
<div align="center">
<table>
<tr>
<td align="left">
<a href="sector.php"><img alt="Volver" src="objetos/volver.jpg"></a>
</td>
<td class="r1" width=595>
</td>
</tr>
</table>
<h3>
<?php
echo 'Zona: ';
echo '<b>'.$_GET["seczon"].'</b>.';
?>
</h3>
<h1>
1.-Químicos
</h1>
<table>
<td>
<?php
mysql_connect('servidor', 'usuario','password')or die ('Ha fallado la conexión: '.mysql_error());
mysql_select_db('base de datos')or die ('Error al seleccionar la Base de Datos: '.mysql_error());
mysql_select_db("articulozona");
$seczon = $_GET['seczon'];
$sql = "SELECT * FROM articulozona WHERE ((hosco='$seczon') OR (hosba='$seczon') OR (hosha='$seczon') OR (hoszc='$seczon') OR (catco='$seczon') OR (catba='$seczon') OR (indba='$seczon') OR (indpr='$seczon') OR (resco='$seczon') OR (resba='$seczon') OR( resha='$seczon') OR (reszc='$seczon')
OR(hoscom='$seczon') OR (rescom='$seczon')) AND (familia='Quimicos')";
$consulta = mysql_query($sql) or die ("No se pudo ejecutar la consulta");
While ($registro=mysql_fetch_array($consulta)){
?>
<form name="KF" method="post" action="resumen.php">
<table class="pruebas" cellspacing="4px" cellpadding="1px">
<tr>
<td class="r1" width=40 style="border:0px solid white" BGCOLOR="D3D3D3" valign="center">
</td>
<td class="r2" width=90 style="border:1px solid white" BGCOLOR="white" valign="center">
<b>Artículo</b>
</td>
<td class="r3" width=340 style="border:1px solid white" BGCOLOR="white" valign="center">
<b>Descripción</b>
</td>
<td class="r4" width=50 style="border:0px solid white" BGCOLOR="white" valign="center">
<b>Foto</b>
</td>
<td class="r5" width=120 style="border:1px solid white" BGCOLOR="white" valign="center">
<b>Codigo EAN</b>
</td>
<td class="r6" width=50 style="border:1px solid white" BGCOLOR="white" valign="center">
<b>Select</b>
</td>
<td>
</td>
</tr>
</table>
<table class="pruebas" cellspacing="4px" cellpadding="1px">
<tr>
<td class="r1" width=40 style="border:0px solid black">
<?php
echo "<a href='descargas.php?articulo=$registro'><img src='objetos/descargar-pdf.png' 'height=30px'.'width=30px'></a>";
?>
</td>
<td class="r2" width=90 style="border:1px solid black">
<FONT FACE="arial" SIZE=1.5>
<?php
echo "<b>".$registro['articulo'];
?>
</font>
</td>
<td class="r3" width=340 style="border:1px solid black">
<FONT FACE="arial" SIZE=1.5>
<?php
echo "<b>".$registro['descripcion'];
?>
</font>
</td>
<td class="r4" width=50 style="border:0px solid white" BGCOLOR="white">
<FONT FACE="arial" SIZE=1.5>
<?php
echo "<a href='fotos.php?articulo=$registro'><img src='objetos/camara1.jpg' 'height=30px'.'width=30px'></a>";
?>
</font>
</td>
<td class="r5" width=120 style="border:1px solid black">
<FONT FACE="arial" SIZE=1.5>
<?php
echo "<b>".$registro['ean']."</b>";
?>
</font>
</td>
<td class="r6" width=50 style="border:0px solid black">
<input type="checkbox" name="articulo[]" value="
<?php echo $registro['articulo']?>
" />
</td>
<td>
</td>
</tr>
</table>
<table>
<input name="ListaOrdenada" value="articulo" type="hidden" value="Resumen" style="background-color: #01DF3A; color:black; border: 1px solid black">
</table>
<table>
<td align="left">
</td>
</table>
<?php
}
?>
</td>
</table>
<?php
echo "<input src='objetos/lupaverde.JPG' name='articulo' alt='Enviar datos' onclick='return compruebaDatos()' type='image' width='50' align='middle' border='0' height='50'>";
?>
</div>
</div>
</div>
</body>
</html>
Con este se reciben todos los datos de una elección anterior y ahora el problema lo tengo que el checkbox no me lleva al siguiente fichero php los datos que necesito, yo quiero seleccionar varios articulos y que me lleve la selección de esos ficheros a otro fichero llamado resumen.php
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head>
<link rel="stylesheet" href="text.css" type="text/css" media="all">
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
<meta http-equiv="Page-Enter" content="RevealTrans (Duration=3, Transition=12)">
<meta http-equiv="Page-Enter" content="RevealTrans (Duration=3, Transition=12)">
<title>Resumen</title>
</head>
<body topmargin="0" leftmargin="0" text="" bgcolor="" marginheight="0" marginwidth="0">
<div id="content">
<div id="cabecera">
<a href="index.html"><img alt="Logotipo (40K)" src="objetos/logotipo.bmp"></a>
</div>
<div id="navegacion">
<ul>
<div align="center">
<table class="ancho80" width="100%" border="0" cellpadding="00" cellspacing="0">
<tbody>
<tr>
<td class="a2"><p><font color=white >></font><font type="Aircraft regular">Registro: ACCESO</font></p></td>
<td class="a3"><p><b><a href="http://www.celea.es/asociados.php">ASOCIADOS</a> /<a href="http://www.celea.es/clientes.php">CLIENTES</a></b></p></td>
<td class="a4"><p><a href="http://www.celea.es/productos.php">PRODUCTOS</a></p></td>
<td class="a5"><p><a href="http://www.celea.es/contactar.php">CONTACTO</a></p></td>
</tr>
</tbody>
</table>
</div>
</ul>
</div>
</div>
<fonf face="Verdana">
<div align="center">
<div class="nuevo">
<h1>Resumen</h1>
<div class="otro">
<table class="pruebas" cellspacing="4px" cellpadding="1px">
<tr>
<td class="r1" width=40 style="border:0px solid white" BGCOLOR="D3D3D3" valign="center">
</td>
<td class="r2" width=90 style="border:1px solid white" BGCOLOR="white" valign="center">
<b>Artículo</b>
</td>
<td class="r3" width=340 style="border:1px solid white" BGCOLOR="white" valign="center">
<b>Descripción</b>
</td>
<td class="r4" width=50 style="border:0px solid white" BGCOLOR="white" valign="center">
<b>Foto</b>
</td>
<td class="r5" width=120 style="border:1px solid white" BGCOLOR="white" valign="center">
<b>Codigo EAN</b>
</td>
<td class="r6" width=50 style="border:1px solid white" BGCOLOR="white" valign="center">
<b>Select</b>
</td>
<td>
</td>
</tr>
</table>
</div>
<?php
mysql_connect('servidor', 'usuario','password')or die ('Ha fallado la conexión: '.mysql_error());
mysql_select_db('basededatos')or die ('Error al seleccionar la Base de Datos: '.mysql_error());
mysql_select_db("articulozona");
echo '<form action="productos.php" method="post" enctype="multipart/form-data">';
echo 'Nombre<input type="Text" size="50" name="nombre" value="nombre">';
$articulo = $_POST['articulo'];
$sql = "SELECT * FROM articulozona WHERE articulo='$articulo'";
$consulta = mysql_query($sql) or die ("No se pudo ejecutar la consulta");
While ($registro=mysql_fetch_assoc($consulta)){
?>
<div align="center">
<table class="pruebas" cellspacing="4px" cellpadding="1px">
<tr>
<td class="r1" width=40 style="border:0px solid black">
<?php
echo "<a href='descargas.php?articulo=$registro'><img src='objetos/descargar-pdf.png'></a>";
?>
</td>
<td class="r2" width=90 style="border:1px solid black">
<FONT FACE="arial" SIZE=1.5>
<?php
echo "<b>".$registro['articulo'];
?>
</font>
</td>
<td class="r3" width=340 style="border:1px solid black">
<FONT FACE="arial" SIZE=1.5>
<?php
echo "<b>".$registro['descripcion'];
?>
</font>
</td>
<td class="r4" width=50 style="border:0px solid white" BGCOLOR="white">
<FONT FACE="arial" SIZE=1.5>
<?php
echo "<a href='fotos.php?articulo=$registro'><img src='objetos/camara1.jpg' 'height=30px'.'width=30px'></a>";
?>
</font>
</td>
<td class="r5" width=120 style="border:1px solid black">
<FONT FACE="arial" SIZE=1.5>
<?php
echo "<b>".$registro['ean']."</b>";
?>
</font>
</td>
<td class="r6" width=50 style="border:0px solid black">
</td>
<td>
</td>
</tr>
</table>
</div>
<?php
}
?>
</font>
</div>
</div>
</body>
</html>
El caso es que me carga la pagina resumen.php pero completamente en blanco, por lo que en uno de los dos ficheros hay algo mal... o en los dos.
Os pido ayuda, porque ya no se me ocurre nada.
Os doy las gracias por anticipado ;)
Estoy aprendiendo o al menos estoy intentando aprender a usar php y actualmente me encuentro trabajando haciendo un catalogo online
El caso es que he creado un par de bases de datos en mysql
y he creado un par de ficheros en php
El primero es este
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head>
<link rel="stylesheet" href="text.css" type="text/css" media="all">
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
<meta http-equiv="Page-Enter" content="RevealTrans (Duration=3, Transition=12)">
<meta http-equiv="Page-Enter" content="RevealTrans (Duration=3, Transition=12)">
<title>Catalogo Celea</title>
</head>
<body topmargin="0" leftmargin="0" text="" bgcolor="" marginheight="0" marginwidth="0">
<div id="content">
<div id="cabecera">
<a href="index.html"><img alt="Logotipo (40K)" src="objetos/logotipo.bmp"></a>
</div>
<div id="navegacion">
<ul>
<div align="center">
<table class="ancho80" width="100%" border="0" cellpadding="00" cellspacing="0">
<tbody>
<tr>
<td class="a2"><p><font color=white >></font><font type="Aircraft regular">Registro: ACCESO</font></p></td>
<td class="a3"><p><b><a href="http://www.celea.es/asociados.php">ASOCIADOS</a> /<a href="http://www.celea.es/clientes.php">CLIENTES</a></b></p></td>
<td class="a4"><p><a href="http://www.celea.es/productos.php">PRODUCTOS</a></p></td>
<td class="a5"><p><a href="http://www.celea.es/contactar.php">CONTACTO</a></p></td>
</tr>
</tbody>
</table>
</div>
</ul>
</div>
<?php
mysql_connect('servidor', 'usuario','contraseña')or die ('Ha fallado la conexión: '.mysql_error());
mysql_select_db('basededatos')or die ('Error al seleccionar la Base de Datos: '.mysql_error());
mysql_select_db("lakuak");
?>
<div class="otro">
<div class="nuevo">
<div align="center">
<table>
<tr>
<td align="left">
<a href="sector.php"><img alt="Volver" src="objetos/volver.jpg"></a>
</td>
<td class="r1" width=595>
</td>
</tr>
</table>
<h3>
<?php
echo 'Zona: ';
echo '<b>'.$_GET["seczon"].'</b>.';
?>
</h3>
<h1>
1.-Químicos
</h1>
<table>
<td>
<?php
mysql_connect('servidor', 'usuario','password')or die ('Ha fallado la conexión: '.mysql_error());
mysql_select_db('base de datos')or die ('Error al seleccionar la Base de Datos: '.mysql_error());
mysql_select_db("articulozona");
$seczon = $_GET['seczon'];
$sql = "SELECT * FROM articulozona WHERE ((hosco='$seczon') OR (hosba='$seczon') OR (hosha='$seczon') OR (hoszc='$seczon') OR (catco='$seczon') OR (catba='$seczon') OR (indba='$seczon') OR (indpr='$seczon') OR (resco='$seczon') OR (resba='$seczon') OR( resha='$seczon') OR (reszc='$seczon')
OR(hoscom='$seczon') OR (rescom='$seczon')) AND (familia='Quimicos')";
$consulta = mysql_query($sql) or die ("No se pudo ejecutar la consulta");
While ($registro=mysql_fetch_array($consulta)){
?>
<form name="KF" method="post" action="resumen.php">
<table class="pruebas" cellspacing="4px" cellpadding="1px">
<tr>
<td class="r1" width=40 style="border:0px solid white" BGCOLOR="D3D3D3" valign="center">
</td>
<td class="r2" width=90 style="border:1px solid white" BGCOLOR="white" valign="center">
<b>Artículo</b>
</td>
<td class="r3" width=340 style="border:1px solid white" BGCOLOR="white" valign="center">
<b>Descripción</b>
</td>
<td class="r4" width=50 style="border:0px solid white" BGCOLOR="white" valign="center">
<b>Foto</b>
</td>
<td class="r5" width=120 style="border:1px solid white" BGCOLOR="white" valign="center">
<b>Codigo EAN</b>
</td>
<td class="r6" width=50 style="border:1px solid white" BGCOLOR="white" valign="center">
<b>Select</b>
</td>
<td>
</td>
</tr>
</table>
<table class="pruebas" cellspacing="4px" cellpadding="1px">
<tr>
<td class="r1" width=40 style="border:0px solid black">
<?php
echo "<a href='descargas.php?articulo=$registro'><img src='objetos/descargar-pdf.png' 'height=30px'.'width=30px'></a>";
?>
</td>
<td class="r2" width=90 style="border:1px solid black">
<FONT FACE="arial" SIZE=1.5>
<?php
echo "<b>".$registro['articulo'];
?>
</font>
</td>
<td class="r3" width=340 style="border:1px solid black">
<FONT FACE="arial" SIZE=1.5>
<?php
echo "<b>".$registro['descripcion'];
?>
</font>
</td>
<td class="r4" width=50 style="border:0px solid white" BGCOLOR="white">
<FONT FACE="arial" SIZE=1.5>
<?php
echo "<a href='fotos.php?articulo=$registro'><img src='objetos/camara1.jpg' 'height=30px'.'width=30px'></a>";
?>
</font>
</td>
<td class="r5" width=120 style="border:1px solid black">
<FONT FACE="arial" SIZE=1.5>
<?php
echo "<b>".$registro['ean']."</b>";
?>
</font>
</td>
<td class="r6" width=50 style="border:0px solid black">
<input type="checkbox" name="articulo[]" value="
<?php echo $registro['articulo']?>
" />
</td>
<td>
</td>
</tr>
</table>
<table>
<input name="ListaOrdenada" value="articulo" type="hidden" value="Resumen" style="background-color: #01DF3A; color:black; border: 1px solid black">
</table>
<table>
<td align="left">
</td>
</table>
<?php
}
?>
</td>
</table>
<?php
echo "<input src='objetos/lupaverde.JPG' name='articulo' alt='Enviar datos' onclick='return compruebaDatos()' type='image' width='50' align='middle' border='0' height='50'>";
?>
</div>
</div>
</div>
</body>
</html>
Con este se reciben todos los datos de una elección anterior y ahora el problema lo tengo que el checkbox no me lleva al siguiente fichero php los datos que necesito, yo quiero seleccionar varios articulos y que me lleve la selección de esos ficheros a otro fichero llamado resumen.php
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head>
<link rel="stylesheet" href="text.css" type="text/css" media="all">
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
<meta http-equiv="Page-Enter" content="RevealTrans (Duration=3, Transition=12)">
<meta http-equiv="Page-Enter" content="RevealTrans (Duration=3, Transition=12)">
<title>Resumen</title>
</head>
<body topmargin="0" leftmargin="0" text="" bgcolor="" marginheight="0" marginwidth="0">
<div id="content">
<div id="cabecera">
<a href="index.html"><img alt="Logotipo (40K)" src="objetos/logotipo.bmp"></a>
</div>
<div id="navegacion">
<ul>
<div align="center">
<table class="ancho80" width="100%" border="0" cellpadding="00" cellspacing="0">
<tbody>
<tr>
<td class="a2"><p><font color=white >></font><font type="Aircraft regular">Registro: ACCESO</font></p></td>
<td class="a3"><p><b><a href="http://www.celea.es/asociados.php">ASOCIADOS</a> /<a href="http://www.celea.es/clientes.php">CLIENTES</a></b></p></td>
<td class="a4"><p><a href="http://www.celea.es/productos.php">PRODUCTOS</a></p></td>
<td class="a5"><p><a href="http://www.celea.es/contactar.php">CONTACTO</a></p></td>
</tr>
</tbody>
</table>
</div>
</ul>
</div>
</div>
<fonf face="Verdana">
<div align="center">
<div class="nuevo">
<h1>Resumen</h1>
<div class="otro">
<table class="pruebas" cellspacing="4px" cellpadding="1px">
<tr>
<td class="r1" width=40 style="border:0px solid white" BGCOLOR="D3D3D3" valign="center">
</td>
<td class="r2" width=90 style="border:1px solid white" BGCOLOR="white" valign="center">
<b>Artículo</b>
</td>
<td class="r3" width=340 style="border:1px solid white" BGCOLOR="white" valign="center">
<b>Descripción</b>
</td>
<td class="r4" width=50 style="border:0px solid white" BGCOLOR="white" valign="center">
<b>Foto</b>
</td>
<td class="r5" width=120 style="border:1px solid white" BGCOLOR="white" valign="center">
<b>Codigo EAN</b>
</td>
<td class="r6" width=50 style="border:1px solid white" BGCOLOR="white" valign="center">
<b>Select</b>
</td>
<td>
</td>
</tr>
</table>
</div>
<?php
mysql_connect('servidor', 'usuario','password')or die ('Ha fallado la conexión: '.mysql_error());
mysql_select_db('basededatos')or die ('Error al seleccionar la Base de Datos: '.mysql_error());
mysql_select_db("articulozona");
echo '<form action="productos.php" method="post" enctype="multipart/form-data">';
echo 'Nombre<input type="Text" size="50" name="nombre" value="nombre">';
$articulo = $_POST['articulo'];
$sql = "SELECT * FROM articulozona WHERE articulo='$articulo'";
$consulta = mysql_query($sql) or die ("No se pudo ejecutar la consulta");
While ($registro=mysql_fetch_assoc($consulta)){
?>
<div align="center">
<table class="pruebas" cellspacing="4px" cellpadding="1px">
<tr>
<td class="r1" width=40 style="border:0px solid black">
<?php
echo "<a href='descargas.php?articulo=$registro'><img src='objetos/descargar-pdf.png'></a>";
?>
</td>
<td class="r2" width=90 style="border:1px solid black">
<FONT FACE="arial" SIZE=1.5>
<?php
echo "<b>".$registro['articulo'];
?>
</font>
</td>
<td class="r3" width=340 style="border:1px solid black">
<FONT FACE="arial" SIZE=1.5>
<?php
echo "<b>".$registro['descripcion'];
?>
</font>
</td>
<td class="r4" width=50 style="border:0px solid white" BGCOLOR="white">
<FONT FACE="arial" SIZE=1.5>
<?php
echo "<a href='fotos.php?articulo=$registro'><img src='objetos/camara1.jpg' 'height=30px'.'width=30px'></a>";
?>
</font>
</td>
<td class="r5" width=120 style="border:1px solid black">
<FONT FACE="arial" SIZE=1.5>
<?php
echo "<b>".$registro['ean']."</b>";
?>
</font>
</td>
<td class="r6" width=50 style="border:0px solid black">
</td>
<td>
</td>
</tr>
</table>
</div>
<?php
}
?>
</font>
</div>
</div>
</body>
</html>
El caso es que me carga la pagina resumen.php pero completamente en blanco, por lo que en uno de los dos ficheros hay algo mal... o en los dos.
Os pido ayuda, porque ya no se me ocurre nada.
Os doy las gracias por anticipado ;)