Ver Mensaje Individual
  #3 (permalink)  
Antiguo 31/08/2005, 12:46
Avatar de The_omars
The_omars
 
Fecha de Ingreso: marzo-2004
Mensajes: 271
Antigüedad: 20 años, 1 mes
Puntos: 0
prueba esto es lo que quiero hacer:

Código PHP:
<?
session_start
();
session_register("col");
if(isset(
$_POST['dato'])){
$dato=$_POST['dato'];
}
$sesion_item=$_SESSION["col"];

if(isset(
$dato)){
if(!isset(
$sesion_item)){
$sesion_item[]=1;
}else{
//fin de si no existe
$sesion_item[]=1
//fin del else
}// fin de si dato
$_SESSION["col"]=$sesion_item;
?>
<script>
function hey(){
document.forms[0].action="consulta2.php";
document.forms[0].submit();
}
</script>
<function>
<table border="1">
<th>EJE</th>
<tr><td><input type="text"><td><input type="text">
<? if(isset($sesion_item)){
foreach(
$sesion_item as $k =>$v){
 echo 
"<tr><td><input type=text><td><input type=text>";
}
}
?>
</table>
<form method="post">
<input type="hidden" name="dato" value="8">
<input type="button" onClick="hey()" value="Agregar">
</form>
habra una forma mas ortodoxa de hacerlo?

Última edición por The_omars; 31/08/2005 a las 13:10