Ver Mensaje Individual
  #5 (permalink)  
Antiguo 04/11/2010, 23:06
daneco1720
 
Fecha de Ingreso: noviembre-2010
Mensajes: 105
Antigüedad: 13 años, 6 meses
Puntos: 0
Respuesta: pasar datos de un formulario a otro sin perderlos

ok dime si voy bien
Y ME FALTA ALGO XQ NO ME DA

<?php

session_start();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Documento sin t&iacute;tulo</title>
</head>

<body>
<table width="45%" height="323" border="1">
<tr>
<th height="317" scope="col"><form action="admincf.php" method="post" name="form1" target="_self" id="form1">
<label>DATOS DEL PRODUCTO <br />
<br />
Producto
<input name="nom_prod" type="text" id="nom_prod" />
<br />
<br />
</label>
<p>
<label>codigo
<input name="id_prod" type="text" id="id_prod" />
</label>
</p>
<p>
<label></label>
<label>descripcion
<textarea name="desc" id="desc"></textarea>
</label>
</p>
<p>
<label></label>
<label></label>
<label></label>
<label>foto
<input name="url" type="text" id="url" />
</label>
</p>
<p>
<label>precio
<input name="price" type="text" id="price" />
</label>
<label></label>
<label></label>
</p>
<p>&nbsp;</p>
<p>
<label>
<input type="submit" name="Submit" value="enviar" />
<br />
</label>
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="55" height="33">
<param name="movie" value="next.swf" />
<param name="quality" value="high" />
<embed src="next.swf" quality="high" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="55" height="33" ></embed>
</object>
</p>
<p>
<label></label>
</p>
<p>
<label></label>
</p>
</form></th>
</tr>
</table>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
</body>
</html>

FORMULARIO2

<?php

session_start();
?>
<?php
$_SESSION['id_prod'] = $_POST[id_prod];
$_SESSION['name_prod']= $_POST[name_prod];
$_SESSION['desc'] = $_POST[desc];
$_SESSION['url']= $_POST[url];
$_SESSION['price'] = $_POST[price];

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Documento sin t&iacute;tulo</title>
</head>

<body>
<table width="44%" height="156" border="1">
<tr>
<th scope="col"><form action="admin1.php" method="post" name="form4" target="_self" id="form4">
<p>CONFIGURACION DEL PRODUCTO</p>
<p>
<label></label>
<label>sistemas operativos
<textarea name="so" id="so"></textarea>
</label>
</p>
<p align="left">
<label></label>
</p>
<p>
<label>capacidad de memoria
<select name="select2">
>
<option selected="selected">512</option>
<option>1 G</option>
<option>2 G</option>
<option>3 G</option>
<option>4 G</option>
<option>mas de 4 G...</option>
</select>
</label>
</p>
<p>
<label>capacidad de disco
<select name="select3">
<option selected="selected">120 G</option>
<option>200 G</option>
<option>250 G</option>
<option>320 G</option>
<option>mas de 320 G...</option>
</select>
</label>
</p>
<p>&nbsp;</p>
<p>
<label>
<input type="submit" name="Submit" value="enviar" />
</label>
</p>
<p>
<label></label>
<label></label>
<label></label>
</p>
</form></th>
</tr>
</table>
</body>
</html>

.PHP DE LA FUNCION REGISTRAR

<?php

session_start();
?>
<?php
$_SESSION['id_prod'] = $_POST[id_prod];
$_SESSION['name_prod']= $_POST[name_prod];
$_SESSION['desc'] = $_POST[desc];
$_SESSION['url']= $_POST[url];
$_SESSION['price'] = $_POST[price];
$_SESSION['so'] = $_POST[so];
$_SESSION['select2']= $_POST[select2];
$_SESSION['select3'] = $_POST[select3];
?>
<?php
include_once "bd/base_anotador.php";
include_once 'bd/table.php';


$base->debug_on(true);

/*$nomcl= new table('cliente',$base);


function registrar_cliente( )
{
global $nomcl;
$nomcl->cod_cliente= $_POST['codcl'];
$nomcl->nombre=$_POST['namecl'];
$nomcl->apellido= $_POST['apllcl'];
$nomcl->cedula= $_POST['idcl'];
$nomcl->email= $_POST['mailcl'];
$nomcl->telefono=$_POST['phonecl'];
$nomcl->licencia= $_POST['textfield7'];
$nomcl->so_cliente= $_POST['select'];
$nomcl->mem_cliente= $_POST['select2'];
$nomcl->dk_cliente= $_POST['select3'];
$nomcl->save();
}
registrar_cliente();*/
$prod= new table('productos',$base);
function registrar_productos()
{
global $prod;

$prod->cod_producto=$_POST['id_prod'];
$prod->nom_producto=$_POST['nom_prod'];
$prod->descripcion_producto=$_POST['desc'];
$prod->foto_producto=$_POST['url'];
$prod->precio_producto=$_POST['price'];
$prod->so_producto=$_POST['so'];
$prod->mem_producto=$_POST['select2'];
$prod->dk_producto=$_POST['select3'];

$prod->save();


}
registrar_productos();

/*function asignar_licencia()
{




}

function registrar_actualizacion()
{





}

*/
?>


ME FALTA ALGO???
ESO ES LO QUE ME IBAS A DECIR???