PHP Script to connect and get data from SQLite database table
<?Php
#### FOR SQLite Database ######
// This will create the database if not exists in the same location where the script is running.
// For a different location give the path details.
// use the SQL dump to create table inside the database.
//$my_conn = new PDO('sqlite:D:\\sqlite-data\\my_date.db');// different path
$my_conn = new PDO('sqlite:'.dirname(__FILE__).'/my_date.db'); // same location
$my_conn->setAttribute(PDO::ATTR_ERRMODE,PDO::ERRMODE_EXCEPTION);
#### end of SQLite database connection #####
$query="SELECT record_id,my_dt,month_year FROM table_dt WHERE my_dt=DATE('now')";
echo "<table><tr><th>record_id</th><th>Date</th>
<th>month-year</th></tr>";
foreach($my_conn->query($query) as $row){
echo "<tr><td>$row[record_id]</td><td>$row[my_dt]</td>
<td>$row[month_year]</td></tr>";
}
echo "</table>";
?>