Re: test en php-flash
| From: | David Herrero | Date: | Tue, 06 May 2003 22:28:25 +0000 |
| Subject: | Re: test en php-flash | ||
| References: | 1 | Groups: | php.general.es |
| Request: | Send a blank email to general-es+get-35902@lists.php.net to get a copy of this message | ||
no, deberías grabarlas
----- Original Message -----
From: "Juan Diego" <JDRAMOS@terra.es>
To: <lista@phpes.com>
Sent: Tuesday, May 06, 2003 11:56 PM
Subject: [PHP-ES] test en php-flash
hola;
estoy desarrollando un test en flash que puede tener 4 respuestas.
hay 26 preguntas o situaciones,
el participante respondera de acuerdo a seis opciones,
con las cuales obtendrá un numero entre 26 y 156.
a) si el numero está entre 26 y 58 obtendrá un resultado
b) si el numero está entre 59 y 90 obtendrá otro resultado
c) si el numero está entre 91 y 122 obtendrá otro resultado
d) si el numero está entre 123 y 156 obtendrá otro resultado.
lo que quiero mostrar en la pagina flash es el tanto por ciento
perteneciente a cada grupo (a,b,c o d)
y el numero de participantes que han hecho el test.
he creado este script para guardar los resultados en un txt :
<?php
$suma = $HTTP_GET_VARS[suma]; // suma esla variable resultado del test.
$URL = "http://www.cualquierdominio.com/test.txt";
$fp = fopen( $URL,"r");
if ($suma >= 26 && $suma <= 58){
$a = $a + 1}
if ($suma >= 59 && $suma <=90) {
$b = $b + 1}
if ($suma >=91 && $suma <=122) {
$c = $c + 1}
if ($suma >=123 && $suma <=156) {
$d = $d + 1}
fclose( $fp );
las variables $a, $b, $c y $d se almacenarian en el archivo txt de esta
forma?
muchas gracias,
juan diego