jesusjalpan
Bovino maduro
- Desde
- 22 Nov 2008
- Mensajes
- 129
- Tema Autor
- #1
hola amigos tengo un problemma, estoy haciendo un foro pss sencillo pero ala hora de hacer la consulta ala base no me muestra el resultado en la pagina.. espero me puedan ayudar
aki dejo el codigo para que me digan donde esta mi errorr...
gracias......
<html>
<?php
$usuario=$_POST['usuario'];
$titulo=$_POST['titulo'];
$mensaje=$_POST['mensaje'];
$identificador=$_POST['identificador'];
$conexion =mysql_connect("127.0.0.1","root","") or die ("error en la conexion");
mysql_select_db("foro1",$conexion);
$consulta = mysql_query("SELECT * from foro where identificador = 0 ORDER BY fecha desc",$conexion);
mysql_close($conexion);
?>
<head>
<title>ForoTec</title>
</head>
<body bgcolor="#3399CC" text="#FFFFFF" link="#FFFFFF">
<table width="90%" border="0" align="center" cellpadding="2" cellspacing="2">
<tr>
<td bgcolor="#333333"><h2>Foro Tec</h2>
<div align="right">[ <a href="inicio.html">Inicio</a> ][ <a href="formulario.html">Crear tema </a>]</div></td>
</tr>
</table>
<table width="89%" border="0" align="center" cellpadding="0" cellspacing="0">
<br>
<br>
<tr>
<td width="27%"><b>Titulo</b></td>
<td width="27%"><b>Mensaje</b></td>
<td width="16%"><b>Usuario</b></td>
<td width="15%"><b>Respuestas</b></td>
<td width="15%">
<div align="center"><b>Ultima Resp. </b></div></td>
</tr>
</table>
<table width="89%" border="0" align="center" cellpadding="2" cellspacing="2" bgcolor="<?=$color?>">
<tr>
<?php echo $conexion["titulo"];?>
<td width="25%"></a><font size="-2"><?php echo $conexion["titulo"];?></font>
<td width="27%"><font size="-2"><?php echo $conexion["mensaje"];?></font></td>
<td width="18%" align="center"><font size="-2">Por <b>
<?php echo $conexion["usuario"];?>
</b><br>
el
<?php echo $conexion["fecha"];?> </font></td>
<td width="14%" align="center"><font size="-2">
<?php echo $conexion["respuestas"];?>
</font></td>
<td width="16%" align="center"><font size="-2">
<?php echo $conexion["ult_respuesta"];?>
</font></td>
</tr>
</table>
</html>
aki dejo el codigo para que me digan donde esta mi errorr...
gracias......
<html>
<?php
$usuario=$_POST['usuario'];
$titulo=$_POST['titulo'];
$mensaje=$_POST['mensaje'];
$identificador=$_POST['identificador'];
$conexion =mysql_connect("127.0.0.1","root","") or die ("error en la conexion");
mysql_select_db("foro1",$conexion);
$consulta = mysql_query("SELECT * from foro where identificador = 0 ORDER BY fecha desc",$conexion);
mysql_close($conexion);
?>
<head>
<title>ForoTec</title>
</head>
<body bgcolor="#3399CC" text="#FFFFFF" link="#FFFFFF">
<table width="90%" border="0" align="center" cellpadding="2" cellspacing="2">
<tr>
<td bgcolor="#333333"><h2>Foro Tec</h2>
<div align="right">[ <a href="inicio.html">Inicio</a> ][ <a href="formulario.html">Crear tema </a>]</div></td>
</tr>
</table>
<table width="89%" border="0" align="center" cellpadding="0" cellspacing="0">
<br>
<br>
<tr>
<td width="27%"><b>Titulo</b></td>
<td width="27%"><b>Mensaje</b></td>
<td width="16%"><b>Usuario</b></td>
<td width="15%"><b>Respuestas</b></td>
<td width="15%">
<div align="center"><b>Ultima Resp. </b></div></td>
</tr>
</table>
<table width="89%" border="0" align="center" cellpadding="2" cellspacing="2" bgcolor="<?=$color?>">
<tr>
<?php echo $conexion["titulo"];?>
<td width="25%"></a><font size="-2"><?php echo $conexion["titulo"];?></font>
<td width="27%"><font size="-2"><?php echo $conexion["mensaje"];?></font></td>
<td width="18%" align="center"><font size="-2">Por <b>
<?php echo $conexion["usuario"];?>
</b><br>
el
<?php echo $conexion["fecha"];?> </font></td>
<td width="14%" align="center"><font size="-2">
<?php echo $conexion["respuestas"];?>
</font></td>
<td width="16%" align="center"><font size="-2">
<?php echo $conexion["ult_respuesta"];?>
</font></td>
</tr>
</table>
</html>