Skip to content

Commit

Permalink
WebSQL was removed from Chrome => sqlproxy.php now accesses SQLite
Browse files Browse the repository at this point in the history
  • Loading branch information
Johannes Schildgen committed Nov 27, 2023
1 parent 96b6c62 commit 8587755
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions sqlproxy.php
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
<?php
header("Content-type: text/plain");

$engine = $_REQUEST['engine'];
$engine = @$_REQUEST['engine'];

switch ($engine) {
case "mysql":
$dbh = new PDO("mysql:host=localhost;dbname=oth", "oth", "password");
break;
case "pgsql":
default:
$dbh = new PDO("pgsql:dbname=oth", "oth", "password");
break;
case "sqlite":
default:
$dbh = new PDO("sqlite:webshop.db");
break;
}

if (!$dbh) {
Expand Down

0 comments on commit 8587755

Please sign in to comment.