Xampp Php - 7.1.3

Even with a clean install, you may encounter problems. Here are the most frequent ones.

XAMPP is a stack of software that provides a comprehensive development environment for web applications. It includes:

PHP 7.1.3 still includes mcrypt but throws a deprecation warning. In PHP 7.2+, it’s gone. If your app relies heavily on mcrypt_encrypt(), you have three options:

Given that this is a legacy version, you may need to adjust the following settings for compatibility: xampp php 7.1.3

; Maximum execution time for legacy scripts
max_execution_time = 180

; Memory limit (many old scripts are memory-hungry) memory_limit = 256M

; Error reporting – turn OFF for production, but keep E_ALL for dev error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT display_errors = On

; Deprecated Mcrypt (removed in PHP 7.2, but 7.1.3 still has it) extension=php_mcrypt.dll ; Windows ; extension=mcrypt.so ; Linux Even with a clean install, you may encounter problems

; OpenSSL extension=php_openssl.dll

; Allow short open tags? Many legacy apps depend on it. short_open_tag = On

; Upload sizes for legacy file managers upload_max_filesize = 64M post_max_size = 68M </div> <

<?php
$page_title = 'Dashboard';
require_once 'config/database.php';
include 'includes/header.php';
?>

<div class="dashboard"> <h2>Welcome to Contact Manager</h2>

<?php
// Get statistics
$result = $conn->query("SELECT COUNT(*) as total FROM contacts");
$total_contacts = $result->fetch_assoc()['total'];
?>
<div class="stats">
    <div class="stat-card">
        <h3><?php echo $total_contacts; ?></h3>
        <p>Total Contacts</p>
    </div>
</div>
<div class="recent-contacts">
    <h3>Recent Contacts</h3>
    <?php
    $recent = $conn->query("SELECT * FROM contacts ORDER BY created_at DESC LIMIT 5");
    if ($recent->num_rows > 0) 
        echo '<table class="contact-table">';
        echo '<tr><th>Name</th><th>Email</th><th>Phone</th></tr>';
        while($row = $recent->fetch_assoc()) 
            echo "<tr>";
            echo "<td>" . htmlspecialchars($row['name']) . "</td>";
            echo "<td>" . htmlspecialchars($row['email']) . "</td>";
            echo "<td>" . htmlspecialchars($row['phone']) . "</td>";
            echo "</tr>";
echo '</table>';
     else 
        echo '<p>No contacts found.</p>';
?>
</div>

</div>

<?php include 'includes/footer.php'; ?>