Ver Mensaje Individual
  #1 (permalink)  
Antiguo 22/11/2005, 16:16
Avatar de jair20x
jair20x
 
Fecha de Ingreso: noviembre-2005
Ubicación: Madrid - España
Mensajes: 532
Antigüedad: 18 años, 5 meses
Puntos: 1
Lo Necesito Urgente

hola quisiera saber porque este codigo no me va aumentando las filas como debe ser debe generarme un detalle
Código PHP:
/*--------------------------------------------*/

<html>
<head>
<title>Documento sin t&iacute;tulo</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<?php
$max
=$_POST["jp"];
$max+=1;
$max;
?>
<style type="text/css">
<!--
.Estilo1 {color: #FF9900}
-->
</style>
</head>
<body>
<?php echo $max-1?>


<table border="1">
<tr>
<td>Nombre</td>
<td>apellido</td>
<td>etc</td>
</tr>
<?php
$nombre
[$max]=$_POST["d1"];
$apellido[$max]=$_POST["d2"];
$etc[$max]=$_POST["d3"];

$c=0;
while(
$c<$max){

?>
<tr>
<td><?php echo $nombre[$c+1];?></td>
<td><?php echo $apellido[$c+1];?></td>
<td><?php echo $etc[$c+1];?></td>
</tr>


<?php 
$c
=$c+1;
}
?>
</table>


<form name="form1" method="post" action="">
nombre<input name="d1" type="text">
direccion<input type="text" name="d2">
etc<input type="text" name="d3">
<input name="jp" type="hidden" value="<?php echo $max;?>">
  <input type="submit" name="Submit" value="Enviar">
</form>
</body>
</html>

/*--------------------------------------------*/
espero que me puedan ayudar

Última edición por jam1138; 23/11/2005 a las 16:43