Código HTML:
<form action="" method="post"> Pregunta: <input name="pregunta" type="text" id="pregunta" required="required"/> <input type="submit" name="evaluacion" value="Crear"/><br /><br />
Código PHP:
if (isset ($_REQUEST['evaluacion'])) //validar si se presioan el boton evaluacion
{
error_reporting(E_ALL ^ E_NOTICE);
$pregunta=$_POST['pregunta'];
$tematicaId=$row_curso_evaluacion['tematicasId'];
$sql="insert into evaluacion values ('','$pregunta','$tematicaId')";
mysql_query ($sql);
echo "Pregunta Ingresada";
$evaluacionId=$row_curso_evaluacion['tematicasId'];
header("Location: respuesta.php?tematicasId=$evaluacionId");
}
?>
Código PHP:
Ingrese las respuestas a la pregunta:
<br />
<?php echo $row_pregunta['evaluacionPregunta']; ?>
<?php
$cont=0;
for($cont=0; $cont=3; $cont++){?>
<form method="post" action=""/>
<table width="200" border="1">
<tr>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
</tr>
</table>
<input type="submit" name="login" value="enviar respuesta"/>
</form>
<?php
$cont++;
echo $cont;
}
error_reporting(E_ALL ^ E_NOTICE);
$evaluacionId=$row_pregunta['evaluacionId'];
$respuesta1=$_POST['r1'];
$respuesta2=$_POST['r2'];
$respuesta3=$_POST['r3'];
echo $respuesta1;
echo $respuesta2;
echo $respuesta3;
?>
Agradezco mucho su colaboracion