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

  1. <?php 
  2. $user='root';
  3. $pass='';
  4. $dbh=new PDO('mysql:host=localhost;dbname=Čempionatas',$user,$pass);
  5. if(!$dbh)
  6. echo "connection with database failed!";
  7.  
  8.  
  9. ?>
  10.  
  11.  
  12. <!DOCTYPE html>
  13. <html lang="en">
  14. <head>
  15. <meta charset="UTF-8">
  16. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  17. <meta http-equiv="X-UA-Compatible" content="ie=edge">
  18. <meta name="Description" content="Enter your description here"/>
  19. <link rel="stylesheet" href="css/bootstrap.min.css">
  20. <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/all.min.css">
  21. <link rel="stylesheet" href="css/style.css">
  22. <title>Hotel</title>
  23. </head>
  24. <body>
  25.  
  26.  
  27.  
  28.  
  29. <h1 class="text-center m-4">Rónald Gómez</h1>
  30.  
  31. $places = array(
  32.     array(
  33.         'name' => 'xxx',
  34.         'place' => 'aaa',
  35.         'oof' => 'bbb',
  36.         ),
  37.     array()
  38.     );
  39.  
  40.  
  41.     foreach ($places as $row) {
  42.      echo '<tr>';
  43.     echo '<td>' .$row['name']. '</td>';
  44.     echo '<td>' .$row['place']. '</td>';
  45.  
  46.       echo '<tr>';
  47.                         }
  48.  
  49.     </body>
  50.  
  51. </html>
  52.  
  53.     
File Description
  • QQQQQ
  • PHP Code
  • 22 Jan-2021
  • 1.07 Kb
You can Share it: