![Antiguo](http://static.forosdelweb.com/fdwtheme/images/statusicon/post_old.gif)
03/06/2010, 16:22
|
![Avatar de zijgeven](http://static.forosdelweb.com/customavatars/avatar356942_1.gif) | | | Fecha de Ingreso: junio-2010
Mensajes: 1
Antigüedad: 14 años, 8 meses Puntos: 0 | |
Ayuda con php Hola soy nuevo aca y tengo un detalle que no se como resolver en php estoy usando el $_POST y el for pero cada vez que ingreso el segundo grupo de datos y los procesa modifica al primero ingresado repitiendose en ambas el nuevo dato escrito aca dejo el codigo a ver quien me puede ayudar o q me falta gracias
<html>
<head><title> REGISTRO DE N ALUMNOS </title></head>
<body bgcolor="#FF9900">
<form action="registros.php" method="POST">
PROGRAMA PHP QUE PERMITE REGISTRAR N ALUMNOS<br>
================================================== ====================================
<br><br>
Ingrese numero de alumnos a registrar......................................... ........
<input type="text" name="registro" size="4">
<br>============================================== ====================================
<br><input type="submit" values="<<PROCESAR >>" <br>
<br>
Ingrese codigo de matricula......................................... ..................
<input type="text" name="codigom" size=<br>
<br>
Ingrese nombres y apellidos......................................... .................
<input type="text" name="nomape" size=<br>
<br>
Ingrese ciclo............................................. ............................
<input type="text" name="ciclo" size=<br>
<br>
Ingrese turno............................................. ............................
<input type="text" name="turno" size="4">
<br>
Ingrese carrera........................................... ............................
<input type="text" name="carrera" size="4">
<br>
Ingrese horario........................................... ...........................
<input type="text" name="horario" size=<br>
<br>============================================== ====================================
<?
$registro=$_POST["registro"];
$codigom=$_POST["codigom"];
$nomape=$_POST["nomape"];
$ciclo=$_POST["ciclo"];
$turno=$_POST["turno"];
$carrera=$_POST["carrera"];
$horario=$_POST["horarios"];
for ($i=$registro;$i<=$registro;$i++){
echo "<br> Alumno Nro:".$i;
echo "<br>============================================= ==========================";
echo "<br> Codigo de matricula :".$codigom;
echo "<br> Nombre y Apellido :".$nomape;
echo "<br> Ciclo :".$ciclo;
echo "<br> Turno :".$turno;
echo "<br> Carrera :".$carrera;
echo "<br> Horario :".$horario;
echo "<br> Codigo de matricula :".$codigom;
echo "<br>============================================= ==========================";
}
echo "<br>";
?>
</from>
</body>
</html> |