0

I have a problem and it is this from the page index.php will be sending a variable pagina2.php for the method post encrypted JavaScript ok there goes well, in the pagina2.php it is not capable of processing the varialbe from JavaScript to php leave the example

<script src="base_64.js" type="text/javascript"></script>

<?php
$mylink = $_POST['variable'];        
?>
<script>
var variablejs = "<?php echo $mylink; ?>" ;
  var var1 = Base64.decode(variablejs);
</script>


<?php

 $variablephp = '<script> document.writeln(var1) </script>';
$execute = "project1 -link $variablephp";

        set_time_limit(0);

        $handle = popen($execute, "r");

You can see that the variable retrieved from index.php gets and sends the script to decrypt it there will bein but after decrypting and pass it to php does not work does not seize their value, I appreciate suggestion matches of the because this happens

  • The PHP code is executed on the server before the response is sent to the client and the client executes the JavaScript. There is no magically interconnection between PHP and JavaScript. – Felix Kling Sep 25 '15 at 06:17
  • This is probably a better duplicate, you should read that: http://stackoverflow.com/q/13840429/218196 – Felix Kling Sep 25 '15 at 06:21

0 Answers0