Ver Mensaje Individual
  #4 (permalink)  
Antiguo 29/08/2008, 10:26
Sairox
 
Fecha de Ingreso: julio-2004
Mensajes: 323
Antigüedad: 19 años, 9 meses
Puntos: 1
Respuesta: [Ayuda]Cual seria el....

ok bueno estos son los codigos que yo uso mas o menos como iria?
....
top
....
$sql="select * from nodrisa";
$resultado=mysql_query($sql,$conexion);
$tabla=mysql_fetch_array($resultado);
if($tabla){
echo "<table border='0' align='center'>";
do{
echo "<tr><td colspan=4>".$tabla['comentario']."</td></tr>";
}while($tabla=mysql_fetch_array($resultado));
echo "</table>";
}
else{
echo "No se han encontrado resultados en la busqueda";
}
mysql_close($conexion);
?>




....
top
....

if ($_REQUEST[enviar]) {
$comentario=$_REQUEST["comentario"];

$sql="insert into nodrisa(comentario) values ('".$comentario."')";
$resultado=mysql_query($sql,$conexion) or die (mysql_error());

echo <<<html
<script>
window.location="envioexitoso.html";
</script>

html;
}
?>

<head>
<title>Contacto</title>
<style type="text/css">
<!--
.Estilo1 {
font-size: 36px;
font-style: italic;
font-weight: bold;
}
-->
</style>
</head>


<body>
<p align="center" class="Estilo1">Editar Nodrisa</p>
<table width="579" height="416" border="1" align="center" bgcolor="#CCCCCC">
<tr>
<td width="569" height="410">
<form id="form1" name="form1" method="post" action="<?=$PHP_SELF?>">
<input type="hidden" name="opt">
<strong>
<label></label>
</strong>
<p align="center">
<strong>
<label>Comentario<br />
<textarea name="comentario" cols="80" rows="100" id="comentario"></textarea>
</label>
</strong> </p>
<p align="center">
<label>
<input type="submit" name="enviar" id="enviar" value="Enviar" onclick=verifica()>
</label>
</p>
</form>
<p>
</p></td>
</tr>
</table>

</body>