Bonjour,

J'ai un petit probleme sur l'envoi des variables. j'utilise se code dans flash


Code ActionScript : Sélectionner tout - Visualiser dans une fenêtre à part
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
var variables:LoadVars = new LoadVars();
var a_envoyer:LoadVars = new LoadVars();
variables.onLoad = function(succes:Boolean) 
{
        if (succes) 
        {
                _root.titre = this.titre;
                for (var i = 1; i<=4; i++) 
                {
                        _root['barre'+i]._yscale = this['barre'+i];
                }
        } 
        else 
        {
                trace("Quelque chose n'a pas fonctionné");
        }
};
 
this.onEnterFrame = function() 
{
        if (Key.isDown(Key.ENTER)) 
        {
                a_envoyer.password = this.password.text;
                a_envoyer.sendAndLoad("http://zone112.fr/test/test.php",variables,"GET");
                this.password._visible = false;
        }
};

Sa envoie donc le mot de passe tapez lors de l'appui sur entrez a la page test.php qui est tel

Code PHP : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
 
<!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=UTF-8" />
<title>Document sans titre</title>
</head>
 
<body>
 
<?php
if ($_GET['password'] == 'sdz') {
echo 'titre=Mon+graph&barre1=50&barre2=75&barre3=15&barre4=89';
} else {
echo 'titre=Accès+refusé';
}
 
?>
 
 
 
</body>
</html>

Or le titre vaut undefined

page de test ici http://www.zone112.fr/test/barre.html
merci de votre aide