Conectar.php
<?php
functionabrir_escribir($d1,$d2) {
$escribir=fopen("datos.txt","w+");
fputs($escribir,$d1."n");
fputs($escribir,$d2."n");
fclose($escribir);
}
functionabrir_probar() {
$l=fopen("datos.txt","a");
return$l;
}
function abrir_leer() {
$leer=fopen("datos.txt","r");
$i=0;
while (!feof($leer)) {
$datos[$i]=trim(fgets($leer));
$i++;
}
fclose($leer);
return$datos;
}
functioneliminar(){
unlink("datos.txt");
}
?>
Setting.php
<?php
functionabrir_escribir($d1,$d2) {
$escribir=fopen("datos.txt","w+");
fputs($escribir,$d1."n");
fputs($escribir,$d2."n");
fclose($escribir);
}
functionabrir_probar() {
$l=fopen("datos.txt","a");
return$l;
}
functionabrir_leer() {
$leer=fopen("datos.txt","r");
$i=0;
while (!feof($leer)) {
$datos[$i]=trim(fgets($leer));
$i++;
}
fclose($leer);
return$datos;
}
functioneliminar(){
unlink("datos.txt");
}
?>
Funciones.php
<?php
functionabrir_escribir($d1,$d2) {
$escribir=fopen("datos.txt","w+");
fputs($escribir,$d1."n");
fputs($escribir,$d2."n");
fclose($escribir);
}
functionabrir_probar() {
$l=fopen("datos.txt","a");
return$l;
}
functionabrir_leer() {
$leer=fopen("datos.txt","r");
$i=0;
while (!feof($leer)) {
$datos[$i]=trim(fgets($leer));
$i++;
}
fclose($leer);
return$datos;
}
functioneliminar(){
unlink("datos.txt");
}
?>
Index.php
<?php include("conectar.php");
include("funciones.php");?>
<html>
<head>
<title>notasde alumnosde laseccion</title>
<linkrel="shortcuticon"href="favicon.ico">
<h1 align="center">EVALUACIONDEPROCESAMIENTODE DATOS</h1>
</head>
<body>
<label><h2align="center">programaque determinael listadode alumnosysusrespectivas
notas</h2></label>
<table border="2" weigth="800"align="center">
<tr>
<td>ALUMNOS</td>
</tr>
<tr>
<td>
<form name="form"method="POST"action="<?phpecho$_SERVER['PHP_SELF'];?>">
<fieldset>
<legend>DATOSDELALUMNO</legend>
<br />CEDULA <inputtype="text"name="cedula1"autofocus><br/>
<br />NOMBRE <inputtype="text"name="nombre1"><br/>
<br />NOTA 1 <inputtype="text"name="nota1"><br/>
<br />NOTA 2 <inputtype="text"name="nota2"><br/>
<br />NOTA 3 <inputtype="text" name="nota3"><br/>
<br />
<br /><inputtype="submit"name="boton"value="Inicializar"><inputtype="submit"
name="boton1"value="incluir"><inputtype="submit"name="boton2"value="Mostrar">
</fieldset>
</form>
</td>
<?php
ERROR_REPORTING(0);
if (isset($_POST['boton'])!=NULL) {
abrir_escribir(0,1);
}
if (isset($_POST['boton1'])!=NULL){
$i=0;
foreach($_POSTas$indice=>$x){
$h[$i]=$x;
$i++;
}
escribir($h[0],$h[1],$h[2],$h[3],$h[4]);
}
if (isset($_POST['boton2'])!=NULL) {
$arr=abrir_leer();
$z=leer($arr[0],$arr[1]);
$a1=$arr[0]+1;
$a2=$arr[1]+1;
abrir_escribir($a1,$a2);
?>
<td>
<form action="<?phpecho$_SERVER['PHP_SELF'];?>" method="post">
<fieldset>
<legend>DATOSDELOS ALUMNOS</legend>
<br />CEDULA <inputtype="text" value="<?phpecho$z[1];?>" name="cedulam"
onFocus="this.blur()"><br/>
<br />NOMBRE <inputtype="text"value="<?phpecho$z[2];?>" name="nombrem"
onFocus="this.blur()"><br/>
<br />NOTA 1 <inputtype="text"value="<?phpecho$z[3];;?>"name="nota1m"
onFocus="this.blur()"><br/>
<br />NOTA 2 <inputtype="text"value="<?phpecho$z[4];;?>"name="nota2m"
onFocus="this.blur()"><br/>
<br />NOTA 3 <inputtype="text"value="<?phpecho$z[5];?>"name="nota3m"
onFocus="this.blur()"><br/>
<br/><br/><input type="button"name="boton4"value="Reporte"onclick=
"javascript:window.open('ejemplo2.php')">
</fieldset>
<?php
}
?>
</form>
</table>
</body>
</html>
Ejemplo2.php
<?php
include_once('class/tcpdf/tcpdf.php');
include_once("class/PHPJasperXML.inc.php");
include_once ('setting.php');
$PHPJasperXML= newPHPJasperXML();
$PHPJasperXML->arrayParameter=array("parameter1"=>1);
$PHPJasperXML->load_xml_file("reportseg.jrxml");
$PHPJasperXML->transferDBtoArray($server,$user,$pass,$db);
$PHPJasperXML->outpage("I");
?>

Simular un next del recordset en php de forma rudimentaria