forked from juandavidcr/generador-ed-test-usabilidad
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCuestionario_checkBox.php
executable file
·65 lines (41 loc) · 1.28 KB
/
Cuestionario_checkBox.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
<?php
include ("conexion.php");
session_start();
$idPrueba = $_SESSION['idPrueba'] ;
if (isset($_POST["a"]))
{
$pregunta_a = $_POST["a"];
$tiempoA = 15;
$tiempoB = 20;
agregarAbase($idPrueba,$pregunta_a,$tiempoA,$tiempoB);
}
if (isset($_POST["b"]))
{
$pregunta_b = $_POST["b"];
$tiempoA = 154;
$tiempoB = 240;
agregarAbase($idPrueba,$pregunta_b,$tiempoA,$tiempoB);
}
if (isset($_POST["c"]))
{
$pregunta_c = $_POST["c"];
$tiempoA = 1544;
$tiempoB = 2404;
agregarAbase($idPrueba,$pregunta_c,$tiempoA,$tiempoB);
}
if (isset($_POST["d"]))
{
$pregunta_d = $_POST["d"];
$tiempoA = 1;
$tiempoB = 2;
agregarAbase($idPrueba,$pregunta_d,$tiempoA,$tiempoB);
}
header("Location:Cuestionario.php");
function agregarAbase($idPrueba,$preguntaCuestionario,$tiempoOPtimo,$tiempoAceptable)
{
//echo "la pregunta es :".$preguntaCuestionario."tiene un tiempo optimo de ".$tiempoOPtimo." un tiempo medio de :".$tiempoAceptable;
mysql_query("INSERT INTO Cuestionario(PruebaUsabildad_idPruebaUsabildad,Pregunta,Tiempo_Optimo,Tiempo_Acaptable) VALUES ('$idPrueba','$preguntaCuestionario','$tiempoOPtimo','$tiempoAceptable') ");
$_SESSION['idPrueba'] = $idPrueba ;
header("Location:Cuestionario.php");
}
?>