<?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 '}';
		}

?>