Interprétation $_POST
olidol
Messages postés
4
Date d'inscription
Statut
Membre
Dernière intervention
-
olidol Messages postés 4 Date d'inscription Statut Membre Dernière intervention -
olidol Messages postés 4 Date d'inscription Statut Membre Dernière intervention -
Bonjour,
mon problème est le suivant : je récupère du code HTML et PHP en méthode POST via un javascript externe. En arrivant sur la page d'action, je fais un echo pour récupérer le HTML et le PHP, mais voilà que entre temps, le texte a été réinterprété.
exemple :
devient :
Cette interprétation empêche donc le bon fonctionnement du code appelé, je souhaite donc savoir si il y a un moyen de décoder cela ? J'ai déjà mené des recherches avec le html_entity_decode, il semble que c'est la bonne solution, mais pour ma part je n'arrive à rien.
Voici le code actuel du $_POST :
Merci à vous !
mon problème est le suivant : je récupère du code HTML et PHP en méthode POST via un javascript externe. En arrivant sur la page d'action, je fais un echo pour récupérer le HTML et le PHP, mais voilà que entre temps, le texte a été réinterprété.
exemple :
<div class="letter a"><div class="lettermask m<?php echo rand(1,5);?>"></div><div style="position:absolute;width:<?php echo rand(85,125);?>px;height:<?php echo rand(225,260);?>px;z-index:10;left: <?php echo rand(20,40);?>px;top: <?php echo rand(305,336);?>px;" class="d<?php echo rand(6,9);?>"></div><div style="position:absolute;width:240px;height:73px;z-index:20;left: 120px;top: 404px;" class="d<?php echo rand(6,9);?>" ></div><div style="position:absolute;width:114px;height:251px;z-index:30;left: 290px;top: 326px;" class="d<?php echo rand(6,9);?>" ></div><div style="position:absolute;width:100px;height:242px;z-index:40;left: 56px;top: 94px;" class="d<?php echo rand(6,9);?>"></div><div style="position:absolute;width:110px;height:236px;z-index:5;left: 254px;top: 98px;" class="d<?php echo rand(6,9);?>"></div><div style="position:absolute;width:125px;height:192px;z-index:6;left: 137px;top: 20px;" class="d<?php echo rand(6,9);?>"></div><div class="letterbackground d<?php echo rand(1,5);?>"></div><div class="letterbackground d<?php echo rand(1,5);?>"></div><div class="letterbackground d<?php echo rand(1,5);?>"></div><div class="letterbackground d<?php echo rand(1,5);?>"></div></div>'
devient :
<div class=\"letter a\"><div class=\"lettermask m<?php echo rand(1,5);?>\"></div><div style=\"position:absolute;width:<?php echo rand(85,125);?>px;height:<?php echo rand(225,260);?>px;z-index:10;left: <?php echo rand(20,40);?>px;top: <?php echo rand(305,336);?>px;\" class=\"d<?php echo rand(6,9);?>\"></div><div style=\"position:absolute;width:240px;height:73px;z-index:20;left: 120px;top: 404px;\" class=\"d<?php echo rand(6,9);?>\" ></div><div style=\"position:absolute;width:114px;height:251px;z-index:30;left: 290px;top: 326px;\" class=\"d<?php echo rand(6,9);?>\" ></div><div style=\"position:absolute;width:100px;height:242px;z-index:40;left: 56px;top: 94px;\" class=\"d<?php echo rand(6,9);?>\"></div><div style=\"position:absolute;width:110px;height:236px;z-index:5;left: 254px;top: 98px;\" class=\"d<?php echo rand(6,9);?>\"></div><div style=\"position:absolute;width:125px;height:192px;z-index:6;left: 137px;top: 20px;\" class=\"d<?php echo rand(6,9);?>\"></div><div class=\"letterbackground d<?php echo rand(1,5);?>\"></div><div class=\"letterbackground d<?php echo rand(1,5);?>\"></div><div class=\"letterbackground d<?php echo rand(1,5);?>\"></div><div class=\"letterbackground d<?php echo rand(1,5);?>\"></div></div>
Cette interprétation empêche donc le bon fonctionnement du code appelé, je souhaite donc savoir si il y a un moyen de décoder cela ? J'ai déjà mené des recherches avec le html_entity_decode, il semble que c'est la bonne solution, mais pour ma part je n'arrive à rien.
Voici le code actuel du $_POST :
<div id="userMsg"> <?php echo $_POST['hiddenfield'];?> </div>
Merci à vous !
Bon maintenant problème inattendu, je pensais qu'en passant par un $_POST, les données php serait également traitées mais visiblement non, une idée ? voici la page : http://olivierdolbeau.fr/damier3/damier.php
Merci à vous !