ksduh - 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 ksduh.php

  1. while($res = mysqli_fetch_assoc($result)) {
  2.  
  3. <div class="descr"><?=$res['when']?> door <?
  4. if (substr_compare($res['site'], "http://", 0, 7, true) != 0 &&
  5.     substr_compare($res['site'], "https://", 0, 8, true) != 0) {
  6. $res['site'] = " ";
  7. }
  8.  
  9. htmlspecialchars($res['site'], ENT_QUOTES)
  10.  
  11. //mysqli_real_escape_string($sql, $_POST['message'])
  12. $result = $sql->query("INSERT INTO messages (name, site, message) VALUES ('" . mysqli_real_escape_string($sql, $_POST['name']) . "','" . mysqli_real_escape_string($sql, $_POST['website']) . "','" . mysqli_real_escape_string($sql, $_POST['message']) . "')");
  13.  
  14. //if (str_len($res['site']) >= 7)
  15.  
  16. if (file_exists("/var/www/contents/" . mysqli_real_escape_string($sql, htmlspecialchars($_GET['file']), ENT_QUOTES))) {
  17.  
File Description
  • ksduh
  • PHP Code
  • 10 Dec-2019
  • 753 Bytes
You can Share it: