Tengo un formulario de php, cuyo numero de campos, es la canitdad de valores que tenga un select, aqui esta el codigo
Código :
<html>
<body>
<?php
if (!$link = mysql_connect('localhost', 'TOP_SECRET, 'TOP_SECRET')) {
/* host, usuario, password */
echo 'Algo no furula';
exit;
}
if (!mysql_select_db('DB0103691X', $link)) {
echo 'Algo no furula';
exit;
}
$sql = 'SELECT programas.cve_tema,programas.orden,programas.descripcion, avance.Cub_alumno from programas left join avance on programas.id_tema=avance.id_tema';
$result = mysql_query($sql, $link);
if (!$result) {
echo "DB Error, could not query the database\n";
echo 'MySQL Error: ' . mysql_error();
exit;
}
echo "<center>";
echo "<form action='yettoknow.php' method='post'>";
echo "<table border='1'>";
echo "<tr><td>Tema</td><td>Orden</td><td>Nombre del tema</td><td>Horas Dedicadas</td></tr>";
while ($row = mysql_fetch_array($result)) {
echo "<tr>";
echo "<td>". $row['cve_tema']."</td>";
echo "<td>". $row['orden']."</td>";
echo "<td>". $row['descripcion']."</td>";
echo "<td><input type='Text' name='Horas' /></a></td>";
echo "</tr>";
}
echo "</table>";
echo "</form>";
echo"<center>Escribe la cantidad de horas Que se vieron en el tema</center>";
mysql_free_result($result);
?>
</html>
Quiero INSERTAR las horas en una tabla, pero necesito insertar en una fila diferente cada vez, como logro esto?
