How to do it...

  1. Create the following PHP files and save them in the web server directory named /var/www/./.
  2. Use the following command to create the PHP file:
sudo nano /var/www/show_data_lite.php
  
  1. The show_data_lite.php file should contain the following:
<head> <title>DatabaseDatabase Data</title> <meta http-equiv="refresh" content="10" > </head> <body> Press button to remove the table data <br> <input type="button" onclick="location.href = 'del_data_lite.php';" value="Delete"> <br><br> <b>Recorded Data</b><br> <?php $db = new PDO("sqlite:/var/databases/datasitedatasite/mydatabase.db"); //SQL query $strSQL = "SELECT * FROM recordeddatarecordeddata WHERE itmitm_name LIKE '%'%temp%'"; //Execute the query $response = $db->query($strSQL); ...

Get Raspberry Pi 3 Cookbook for Python Programmers - Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.