Files
crew_admin/public/designer/custom-fonts/custom-fonts.php
Frank John Begornia d225ff22d4 initial commit
2019-10-29 19:29:28 +08:00

30 lines
625 B
PHP

<?php
header("Content-type: text/css; charset: UTF-8");
// database connection
$host = "localhost";
$username = "root";
$password = "";
$db = "custom_design";
// database connection
try{
$conn = new PDO("mysql:host=$host;dbname=$db",$username,$password);
$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
}
catch(PDOException $pe)
{
die('Connection error, because: ' .$pe->getMessage());
}
$q = $conn->prepare("SELECT cssValues FROM fonts");
$q->execute();
while ($row = $q->fetch()) {
echo '@font-face {';
echo $row['cssValues'];
echo '}';
}
?>