Category: Uncategorized

  • PHP Connect To Database

    <?php
    $host = 'localhost';        // Database host
    $db   = 'your_database';    // Database name
    $user = 'your_username';    // Database username
    $pass = 'your_password';    // Database password
    
    // Create connection
    $conn = mysqli_connect($host, $user, $pass, $db);
    
    // Check connection
    if (!$conn) {
        die("Connection failed: " . mysqli_connect_error());
    }
    
    echo "Connected successfully";
    
    // Close connection when done
    mysqli_close($conn);
    ?>
  • HTML Starter Template

    <!DOCTYPE html>
    <html lang="en">
    <head>
    	<meta charset="UTF-8">
    	<meta name="viewport" content="width=device-width, initial-scale=1.0">
    	
    	<!-- SEO Meta Tags -->
    	<meta name="description" content="Your page description here">
    	<meta name="keywords" content="keywords, separated, by, commas">
    	<meta name="author" content="Your Name">
    
    	<title>Your Page Title</title>
    
    	<!-- Google Fonts: Montserrat -->
    	<link href="https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;700&display=swap" rel="stylesheet">
    
    	<!-- Font Awesome Free -->
    	<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.0/css/all.min.css" integrity="sha512-yH+aoK5HgJ5gX0QwxZV84r4UVfZG7bLOVnh1yH0wCk0qj1VfZlh1iQDHduKZ2y+8G9Ej6Gv5wUcXTq9y+FjF6g==" crossorigin="anonymous" referrerpolicy="no-referrer" />
    
    	<!-- Stylesheet -->
    	<link rel="stylesheet" href="styles.css">
    
    	<!-- jQuery CDN -->
    	<script src="https://code.jquery.com/jquery-3.7.1.min.js" integrity="sha256-3fpG7g0DJ7keo4iMZsNIDBhv6fR+Mn4qEFLZ5CPrOUA=" crossorigin="anonymous"></script>
    
    	<!-- AJAX is included with jQuery -->
    
    	<!-- Chart.js -->
    	<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
    
    </head>
    <body>
    
    <div class="main">
    
    	<h1>Hello World</h1>
    	
    	<p>This is a paragraph.</p>
    
    </div>
    
    </body>
    </html>