test 1 - 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 test 1.php

  1. <?php
  2. $search_text = $_REQUEST['search_text'];
  3. $res = mysqli_query("SELECT id_news, news_date, news_caption, news_text, news_id_author
  4.                       FROM news WHERE news_caption LIKE('%$search_text%')");
  5. $res = mysqli_query("SELECT id_news, header, body, author FROM news WHERE id_news = " . $_REQUEST['id']);
  6. group_concat(col, symbol, col)
  7. $res = mysqli_query("SELECT author FROM news WHERE id=" . $_REQUEST['id'] . " AND author LIKE ('a%')");
  8. $id = $_REQUEST['id'];
  9. $res = mysqli_query("SELECT * FROM news WHERE id_news = $id");
  10. SELECT * FROM news WHERE id_news = 12;
  11. INSERT INTO admin (username, password) VALUES ('HaCkEr', 'foo');
  12.  
File Description
  • test 1
  • PHP Code
  • 15 Jan-2023
  • 643 Bytes
You can Share it: