Hi again, I'm totally perplexed. I have been using xampp, mysql and php for years without
problems but now when I try to execute any php file the result is php code. I don't want to
mislead but this started when I began converting php code from mysql to mysqli.

All the while I was changing from windows 7 home premium 32 bit to windows 7 professional
64 bit. I have confirmed my databases, get no errors and don't know how to proceed. I
load this PHP file(certlog.php) with an HTML file(<a href="certlog.php" target="Main">
certlog</a><br>

I'm sending an example.

here is code:

<html><body>
<hr>
<center><b><font size=+2> 515 Certification Expiration Report</font><br>06/22/2020 - 06/22/2021<p>

<hr>
<?php
 
// Report all PHP errors
 error_reporting(E_ALL);
 
// Include config file
require_once "getprerentdb.php";

 $apt = $_POST['apt'];

//MySqli Select Query
$results = $mysqli->query (SELECT * FROM waitlist");

      echo "<table border=1>";
      echo "<th>unit#</th>";
      echo "<th>resident name</th>";
      echo "<th>movein date</th>";
      echo "<th>effect date</th>";
      echo "<th>expire date</th>";
      echo "<th>days left</th>";
      echo "<th colspan=3>recertification notification</th>";
              echo "</tr>";
while($row = mysql_fetch_array($result))
{
echo "<tr>";
echo "<td>" . $row['apt'] . "</td>";
echo "<td>" . $row['name'] . "</td>";
echo "<td>" . $row['moveindate'] . "</td>";
echo "<td>" . $row['effdate'] . "</td>";
echo "<td>" . $row['expdate'] . "</td>";
echo "<td>" . $row['daysleft'] . "</td>";
echo "<td>" . $row['90date'] . "</td>";
echo "<td>" . $row['60date'] . "</td>";
echo "<td>" . $row['30date'] . "</td>";
echo "</tr>";
}
echo "</table>";

    // Free result set
    mysqli_free_result($result);
} else{
    echo "No records matching your query were found.";
}
} else{
    echo "ERROR: unable to execute $sql. " . mysqli_error($link);
}
 
$mysqli -> close();
?> 

</body></html>
---------------------------------------------------------------
here is result:

<html><body>
<hr>
<center><b><font size=+2> 515 Certification Expiration Report</font><br>06/22/2020 - 06/22/2021<p>

<hr>
<?php
 
// Report all PHP errors
 error_reporting(E_ALL);
 
// Include config file
require_once "getprerentdb.php";

 $apt = $_POST['apt'];

//MySqli Select Query
$results = $mysqli->query (SELECT * FROM waitlist");

      echo "<table border=1>";
      echo "<th>unit#</th>";
      echo "<th>resident name</th>";
      echo "<th>movein date</th>";
      echo "<th>effect date</th>";
      echo "<th>expire date</th>";
      echo "<th>days left</th>";
      echo "<th colspan=3>recertification notification</th>";
              echo "</tr>";
while($row = mysql_fetch_array($result))
{
echo "<tr>";
echo "<td>" . $row['apt'] . "</td>";
echo "<td>" . $row['name'] . "</td>";
echo "<td>" . $row['moveindate'] . "</td>";
echo "<td>" . $row['effdate'] . "</td>";
echo "<td>" . $row['expdate'] . "</td>";
echo "<td>" . $row['daysleft'] . "</td>";
echo "<td>" . $row['90date'] . "</td>";
echo "<td>" . $row['60date'] . "</td>";
echo "<td>" . $row['30date'] . "</td>";
echo "</tr>";
}
echo "</table>";

    // Free result set
    mysqli_free_result($result);
} else{
    echo "No records matching your query were found.";
}
} else{
    echo "ERROR: unable to execute $sql. " . mysqli_error($link);
}
 
$mysqli -> close();
?> 

</body></html>

(Edited to remove duplicate text and add [code]...[/code] tags. ~ MOD)

    The OP managed to paste the code three times.

    I'm going to guess that the initial URL being used is actually a file system path, not URL to the web server. The URL you enter in your browser's address bar for the first html page should be similar to - http://localhost/your_file.html. If it looks like - file:///C:/xampp/htdocs/your_file.html, that's directly opening the file in the browser, which will cause any .php file via a link to be directly opened in the browser too, which won't cause the php code to be processed.

    Write a Reply...