diff --git a/assets/style.css b/assets/style.css index da0e000..0a15fc9 100644 --- a/assets/style.css +++ b/assets/style.css @@ -35,7 +35,7 @@ text-decoration: underline; } -.preview h1 { +.preview h1, h2 { margin: 0; padding: 0; margin-bottom: 5px; diff --git a/index.php b/index.php index 87d65a3..854740e 100644 --- a/index.php +++ b/index.php @@ -22,9 +22,10 @@ error_reporting(E_ALL); setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_WARNING ); if (isset($_GET['q']) && preg_replace('/\s+/', '', $_GET['q']) != '') { - $db = new PDO("sqlite:db.sqlite"); $sql = 'SELECT * FROM indexed WHERE 1=1'; @@ -43,7 +44,6 @@ if (isset($_GET['q']) && preg_replace('/\s+/', '', $_GET['q']) != '') { } $sql = $sql . ';'; - $db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_WARNING ); $stmt = $db->prepare($sql); $stmt->execute($params); @@ -93,6 +93,35 @@ if (isset($_GET['q']) && preg_replace('/\s+/', '', $_GET['q']) != '') { if (!$results) echo '