Ver Mensaje Individual
  #2 (permalink)  
Antiguo 08/10/2008, 07:33
joseda76
 
Fecha de Ingreso: julio-2007
Mensajes: 47
Antigüedad: 16 años, 9 meses
Puntos: 0
Respuesta: paginator tengo un problema

se me olvidaba.

Codigo PHP:

Código PHP:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Evaluacion tutoria</title>
<link href="alumno/template.css" rel="stylesheet" type="text/css" />
</head>

<body>
<h2 align="center">EVALUACIÓN TUTORIA</h2>
<hr />

<?php
include("../paginasphp/getuser.php");
include(
"../paginasphp/conectar_bbdd.php");
$tipo='A';

$_pagi_sql="SELECT texto, id FROM preguntas WHERE activo='S' AND tipo='A'"
//$resultado= mysql_query($_pagi_sql); 
$_pagi_cuantos 2;

include(
"../paginasphp/paginator.inc.php");

$i=0;
while(
$row mysql_fetch_assoc($_pagi_result))
    {
    
$array[$i]=$row['texto'];
    
$numero=$row['id'];
    
$identificador[$i]=$tipo.$numero;
    
$i++;    
    }

$contador=$i;
$i=0;
?>

<form action="evaluacionalumno.php" method="post">

<?php
for($i=0$i<$contador;$i++)
{
?>
<div style="padding-left:50px">
<p><?php echo $array[$i?></p>
<div style="padding-left:20px">

<input name="<?php echo $identificador[$i?>" type="radio" value="1">1&nbsp;&nbsp;
<input name="<?php echo $identificador[$i?>" type="radio" value="2">2&nbsp;&nbsp;
<input name="<?php echo $identificador[$i?>" type="radio" value="3">3&nbsp;&nbsp;
<input name="<?php echo $identificador[$i?>" type="radio" value="4">4&nbsp;&nbsp;
<input name="<?php echo $identificador[$i?>" type="radio" value="5">5&nbsp;&nbsp;
<input name="<?php echo $identificador[$i?>" type="radio" value="0">NS/NC

</div>
</div>
<?php
}

    echo
"<p>".$_pagi_navegacion."</p>";

?>

<br />
<div style="padding-left:50px">
<p><input type="submit" value="Guardar" name="submit" class="button"/>
<input type="reset" value="Restablecer" name="reset" class="button"/>
<input type="submit" class="button" name="cancelar" value="Cancelar" onClick="history.back()"/></p>
</form>
</div>

<?php

//Incluimos la información de la página actual
//echo"<p>Mostrando Clientes ".$_pagi_info."</p>";
if(isset($_POST['submit']))
{

for(
$i=0$i<$contador;$i++)
    {
    
$tutoria=$i;
    
$id_pregunta=$identificador[$i];
    
$valor=$_POST[$id_pregunta];

    
$sql"INSERT INTO respuesta VALUES('$tutoria','$id_pregunta','$valor')";
    
$resultadomysql_query($sql);
    }
}



mysql_close($dp); //cierra la conexion 
?>

</body>
</html>