221 - PHP Online
Form of PHP Sandbox
*** This page was generated with the meta tag "noindex, nofollow". This happened because you selected this option before saving or the system detected it as spam. This means that this page will never get into the search engines and the search bot will not crawl it. There is nothing to worry about, you can still share it with anyone.
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.
Result of php executing
Full code of 221.php
- <?php
- $page=$_GET['page'];
- if(isset($page)){
- switch($page){
- case 1:// show general information
- include 'about.htm!';
- break ;.
- case 2: // show latest headlines
- include 'news.html';
- break ;.
- case 3:// show links to other sites
- include 'links.html';
- break ;.
- default:// show error message
- echo 'No such content section. Bad URL!';
- }
- } else {// show home if no page parameter in URL
- include home.html;
- }
- ?>