index.php - PHP Online

Form of PHP Sandbox

Enter Your PHP code here for testing/debugging in the Online PHP Sandbox. As in the usual PHP files, you can also add HTML, but do not forget to add the tag <?php in the places where the PHP script should be executed.



Your result can be seen below.

Result of php executing





Full code of index.php.php

  1. <!DOCTYPE html>
  2.  
  3. <html>
  4.  
  5. <head>
  6.  
  7. <meta charset=”utf-8″>
  8.  
  9. <title>Hello World</title>
  10.  
  11. </head>
  12.  
  13. <body>
  14.  
  15. <h1>Hello World</h1>
  16.  
  17. <form method="post">
  18.  <p><input type="text" name="user"></p>
  19.  <p><button type="reset">Clear form</button>
  20.  <button type="submit">Send form</button></p>
  21. </form>
  22. <?php
  23.   echo $_POST['user']; // Если выбран хоть 1 элемент
  24. ?>
  25.  
  26. <?php
  27. echo "end";
  28. ?>
  29.  
  30. </body>
  31.  
  32. </html>
  33.  
File Description
  • index.php
  • PHP Code
  • 10 Jan-2021
  • 411 Bytes
You can Share it: