<?php
  if (isset($_GET['source'])) {
        highlight_file($_SERVER['SCRIPT_FILENAME']);
        exit;
  }
?>
<html>
<head>
<title>Basic PHP Example</title>
    
     <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <meta name="theme-color" content="#B5C7DD" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <link rel="stylesheet" href="../css/reset.css">
        <link rel="stylesheet" href="../css/mandy.css">

<link rel="shortcut icon" href="../favicon.ico" type="image/x-icon">
</head>
<body>
    
<p class="pad-top">    
    
<?php   # need this to be able to view source in the below anchor tag
  $urlPath=dirname($_SERVER['SCRIPT_URL']).'/'; 
  $labsPath=$urlPath.'labs/'; 
?>     

    <a href="<?=$urlPath?>index.php?source" target="labs">Lab 2 Source code</a>


    
<?php      // declaring variables    
$hoursWorked = 40; 
$payRate = 12; 
$grossPay = $hoursWorked * $payRate; 
         //printing the results
print "<p>Hours Worked: $hoursWorked</p>"; 
print "<p>Pay Rate: $payRate</p>"; 
print "<p>Gross Pay: $grossPay</p>"; 
?>     
    
</p>    
    
    
    
    <p class="hide">
    this is a blank paragraph to do nothing but take up space and ensure the formatting works
    </p>
    <div class="stretch"></div>
    
    
</body>
</html>