<?php
    $username="yourusername";           // Replace with your database username
    $password="yourpassword";           // Replace with your username's password
    $database="yourdatabase";           // Replace with your database name
    $servername="yourlocalhost";        // Replace with your host name
    $tablename= 'tblDownload';          // <========= Replace with your table name
    $DownDir = 'Yourdownloaddirectory'  // <========= Replace with your directory name
try {
    $conn = new PDO("mysql:host=$servername;dbname=$database", $username, $password);
    $conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
    }
catch(PDOException $e)
    {
    echo "Connection failed: " . $e->getMessage();
    }
?>