<?php
require 'db.php';
// Test string from app.js
$corrupted = "เน„เธกเนˆเธกเธ";
$fixed1 = mb_convert_encoding($corrupted, 'Windows-1252', 'UTF-8');
echo "Win-1252: " . $fixed1 . "\n";

echo "--- DB TEST ---\n";
$res = $conn->query("SELECT name FROM products LIMIT 3");
while($row = $res->fetch_assoc()){
    echo $row['name'] . "\n";
}
