<?php
//enable visitors to see the PHP source code of current file
$me basename($_SERVER['PHP_SELF']);
if(isset(
$_GET['showPHP'])){
    
show_source("$me");    
    die();
}
?>

<?php
$firstname 
$_REQUEST['firstname'];
$lastname $_REQUEST['lastname'];
if (
$firstname == 'Jonas' and $lastname == 'Grolin')
{
    
$welcomeText 'Welcome, oh glorious Programmer!';
}
else
{
    
$welcomeText 'Welcome to my web site, ' .
htmlspecialchars($firstnameENT_QUOTES'UTF-8') . ' ' .
htmlspecialchars($lastnameENT_QUOTES'UTF-8') . '!';
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link href="assets/css.css" type="text/css" rel="stylesheet"/>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>

<!--This meta element defines a description of my page:-->
<meta name="description" content="Flowchart of interactive PHP and Source Code" /> 

<!--This meta element defines keywords for my page:-->
<meta name="keywords" content="Flowchart, interactive, PHP, Source, Code" /> 

<!--This meta element identifies the document for search engines as being intended for EN="English" readers.-->
<meta http-equiv="Content-Language" content="en"/>

<title>Interactive PHP</title>
<?php 
include("includes/header.inc.php");
?>
</head>
<body>
<div id="wrapper">
    <div id="center-box">

        <div class="menu bubplastic horizontal aqua">
            <ul>
                <li><span class="menu_r">
                <a href="/mobile/index.php" target="_self">
                    <span class="menu_ar">Mobile</span>
                </a></span></li>
                
                <li><span class="menu_r">
                <a href="?showPHP" target="_self">
                    <span class="menu_ar">Source code</span>
                </a></span></li>
                
                <li><span class="menu_r">
                <a href="sitemap.html" target="_self">
                    <span class="menu_ar">Site map</span>
                </a></span></li>
                
                <li><span class="menu_r">
                <a href="interactive-dk.php" target="_self">
                    <span class="menu_ar"><img src="image/dk-icon.png" alt="Dansk flag"/> Dansk</span>
                </a></span></li>
        
                <li><span class="menu_r">
                <a href="interactive.php" target="_self">
                    <span class="menu_ar"><img src="image/eng-icon.png" alt="English flag"/> English</span>
                </a></span></li>
            </ul>
          <br class="clearit" />
        </div>


<?php 
include("includes/header_img.inc.php");
?>
        <div id="left-right-padding">
<?php 
include("includes/navigation.inc.php");
?>
            <div style="clear: left;"></div>
            <h1>Welcome to my section about PHP</h1>
            <p>PHP is a general-purpose server-side scripting language originally designed 
            for web development to produce dynamic web pages. For this purpose, 
            PHP code is embedded into the HTML source document and interpreted 
            by a web server with a PHP processor module, which generates the web page document.</p>
            
            <p>PHP is historically a procedural language, but is extended with some OO features.</p>
            
            <p>While PHP originally stood for "Personal Home Page", it is now said to stand for 
            "PHP: Hypertext Preprocessor", a recursive acronym.</p>
            
            <p>&nbsp;</p>
            
            <h2>Feel free to write your name.</h2>
            <div style="clear: left;"></div>
<?php 
echo $welcomeText
?>
            
            <form action="interactive.php" method="post">
            <div>
                <label for="firstname">First name:
                <input type="text" name="firstname" id="firstname"/></label>
            </div>
            <div>
                <label for="lastname">Last name:
                <input type="text" name="lastname" id="lastname"/></label>
            </div>
            <div>
                <input type="submit" value="GO"/>
            </div>
            </form>
            <div style="clear: left;"></div>
            <h2>PHP Flowchart</h2>
            <img src="image/guest-eles-programmer.png" alt="php"/>
        </div>
        <br/>
        <br/>
        <br/>
<?php 
include("includes/footer.inc.php");
?>
    </div>
</div>
</body>
</html>