forked from juandavidcr/generador-ed-test-usabilidad
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCrear_Cuestionario.php
executable file
·47 lines (30 loc) · 1.66 KB
/
Crear_Cuestionario.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<?php
include ("conexion.php");
session_start();
$idPrueba = $_SESSION['idPrueba'] ;
echo "el id prueba es ". $idPrueba;
if(isset($_POST["pregunta"], $_POST["tiempoOptimo"], $_POST["tiempoAceptable"]) and $_POST["pregunta"]!="" and $_POST["tiempoOptimo"] !="" and $_POST["tiempoAceptable"] !="")
{
$preguntaCuestionario = $_POST["pregunta"];
$tiempoOPtimo = $_POST["tiempoOptimo"];
$tiempoAceptable = $_POST["tiempoAceptable"];
echo "la pregunta es :".$preguntaCuestionario."tiene un tiempo optimo de ".$tiempoOPtimo." un tiempo medio de :".$tiempoAceptable." y un tiempo fallido ".$tiempoFallido;
mysql_query("INSERT INTO Cuestionario(PruebaUsabildad_idPruebaUsabildad,Pregunta,Tiempo_Optimo,Tiempo_Acaptable) VALUES ('$idPrueba','$preguntaCuestionario','$tiempoOPtimo','$tiempoAceptable') ");
$_SESSION['idPrueba'] = $idPrueba ;
header("Location:Cuestionario.php");
}
else
{
if(isset($_POST["pregunta"]) and $_POST["pregunta"]!="") {
$preguntaCuestionario = $_POST["pregunta"];
$tiempoOPtimo = 0;
$tiempoAceptable = 0;
echo "la pregunta es :".$preguntaCuestionario."tiene un tiempo optimo de ".$tiempoOPtimo." un tiempo medio de :".$tiempoAceptable." y un tiempo fallido ".$tiempoFallido;
mysql_query("INSERT INTO Cuestionario(PruebaUsabildad_idPruebaUsabildad,Pregunta,Tiempo_Optimo,Tiempo_Acaptable) VALUES ('$idPrueba','$preguntaCuestionario','$tiempoOPtimo','$tiempoAceptable') ");
$_SESSION['idPrueba'] = $idPrueba ;
header("Location:Cuestionario.php");
}
echo"ingrese todo los datos";
header("Location:Cuestionario.php");
}
?>