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

  1. <?php
  2.         function check_users($phone_users){
  3.                 $entry = $GLOBALS["entry"];
  4.                 $request = "SELECT phone FROM users WHERE phone = $phone_users AND entry = '$entry'";
  5.  
  6.                 $result = $GLOBALS["conn"]->query($request);
  7.  
  8.  
  9.                 if($result->num_rows==0){
  10.                         print_answer('{"answer": "not found"}');
  11.                 }else{
  12.                         print_answer('{"answer": "found"}');
  13.                 }
  14.         }
File Description
  • wq
  • PHP Code
  • 10 Dec-2021
  • 338 Bytes
You can Share it: