Difícil que funcione bien, cuando tenías un error de sintaxis en el mysql_query()...
Código PHP:
Ver originalfor ($i = 0; $i < count($_POST["idnEst"]); $i++) { $notaTrimestre3 = "" . $_POST['notaTrimestre3'][$i] . "";
//Dentro del for hago una validacion
if ($CohorteSec == 1) {
$trimestre_porcentaje = mysql_query("SELECT nota_primer_trimestre FROM nota_primer_trimestre
WHERE periodo= '".$periodo_trimestre1."' and trimestre= 1");
$NOTA_trimestre1 = $valor_procentaje['nota_primer_trimestre'];
}
//Fuera del IF coloco mi insert
$insertar_nota = mysql_query("INSERT INTO nota(estudiante, asignatura, docente, cod_seccion, nota_primer_trimestre, nota_tercer_trimestre, trayecto, usuario) VALUES ('" . $cedulaEst . "','" . $_SESSION['tmpAsignatura'] . "','" . $cod_profesor . "','" . $_SESSION['tmpSeccion'] . "','" . $NOTA_trimestre1 . "','" . $notaTrimestre3 . "','" . $Procentaje_trimestre3 . "','" . $TrayectoSec . "','" . $usuario . "')", $conexion);
}