fork download
  1. <?php
  2. $a= $_GET['a'];
  3. $b= $_GET['b'];
  4. $c= $_GET['c'];
  5.  
  6. echo $a;
  7. echo $b;
  8. ?>
  9.  
  10. // Все что ниже - моя html страница
  11.  
  12. <html>
  13. <head>
  14. <script src="/js/jquery-3.1.1.min"></script>
  15.  
  16. <script>
  17. function init() {
  18. var first = 1;
  19. var second = 2;
  20. var third = 3;
  21. $.get('my.php',{a:first,b:second,c:third});
  22. });
  23. </script>
  24.  
  25. </head>
  26. <body onClick="init()">
  27. <a href="my.php">Button</a>
  28. </body>
  29. </html>
Success #stdin #stdout #stderr 0s 52488KB
stdin
Standard input is empty
stdout
// Все что ниже - моя html страница

<html>
<head>
<script src="/js/jquery-3.1.1.min"></script>

<script>
function init() {
var first = 1;
var second = 2;
var third = 3;
$.get('my.php',{a:first,b:second,c:third});
});
</script>

</head>
<body onClick="init()">
<a href="my.php">Button</a>
</body>
</html>
stderr
PHP Notice:  Undefined index: a in /home/cPbHKZ/prog.php on line 2
PHP Notice:  Undefined index: b in /home/cPbHKZ/prog.php on line 3
PHP Notice:  Undefined index: c in /home/cPbHKZ/prog.php on line 4