Ver Mensaje Individual
  #1 (permalink)  
Antiguo 21/08/2009, 10:41
kushanku
 
Fecha de Ingreso: noviembre-2008
Mensajes: 28
Antigüedad: 15 años, 5 meses
Puntos: 0
frame con php

hola a todos me por favor necesito ayuda, no se como hacer para colocar mis paginas que .php en la pagina que es el frame por que es .html

¿como hago para linkear mis paginas .php dentro los frame?

espero me puedan ayudar

desde ya muchas gracias.

tengo los siguiente codigos

lista_producto.php
===============

<?php include("conector.php");?>
<?php
$sql = sprintf("select * from producto");
$resul = mysql_query($sql,$conexion) or die (mysql_error());
?>
<html>
<head>
<title>Documento sin t&iacute;tulo</title>
</head>

<body>
<center>Listado de Producto</center>
<table border="1" align="center" width="500">
<tr><td>Producto</td><td>Peso</td><td>Precio</td></tr>
<?php while($fila = mysql_fetch_array($resul))
{
?>
<tr>
<td><?php echo $fila['producto']; ?></td>
<td><?php echo $fila['peso']; ?></td>
<td><?php echo $fila['precio']; ?></td>
</tr>
<?php
}//fin del while
?>
</table>
<?php
mysql_free_result($resul);
?>
</body>
</html>


insertar_producto.php
================

<?php
if(isset($_POST["btn_insertar"]))
{
include("conector.php");
$sql = sprintf("insert into producto(producto,peso, precio) values (%s,%s,%s)",
"'".$_POST["txtproducto"]."'",
"'".$_POST["txtpeso"]."'",
"'".$_POST["txtprecio"]."'");
mysql_query ($sql,$conexion) or die (mysql_error());
}
?>


<html>
<head>
<title>Documento sin t&iacute;tulo</title>
</head>

<body>
<form action="" method="post">
<table border="1" align="center">
<tr>
<td>Producto</td>
<td>
<input name="txtproducto" type="text" size="10" />
</td>
</tr>
<tr>
<td>Peso</td>
<td>
<input name="txtpeso" type="text" size="6" />
</td>
</tr>
<tr>
<td>Peso</td>
<td>
<input name="txtprecio" type="text" size="6" />
</td>
</tr>
<tr>
<td>
<input name="btn_insertar" type="submit" />
</td>
</tr>
</table>
</form>
</body>
</html>

pagina_principal.html
=======================

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Documento sin t&iacute;tulo</title>
</head>

<frameset rows="50%,50%">
<frame src="insertar_producto.php" name="principal" />
<frame src="lista_producto.php">
</frameset><noframes></noframes>
</html>