This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Learning Note</title> | |
{{ HTML::style('css/style.css'); }} | |
</head> | |
<body> | |
<div id="header"> | |
<h1>Welcome to Hoang Anh'note</h1> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$dbInfo = "mysql:host=localhost;dbname=simple_blog"; | |
$dbUser = "root"; | |
$dbPassword = ""; | |
$db = new PDO( $dbInfo, $dbUser, $dbPassword ); | |
$db->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function saveEntry ( $title, $content ) { | |
global $db; | |
$entrySQL = "INSERT INTO php_raw_post ( post_title, post_content ) VALUES ( ?, ?)"; | |
$entryStatement = $db->prepare( $entrySQL ); | |
$formData = array( $title, $content ); | |
$entryStatement = makeStatement( $entrySQL, $formData ); | |
return $db->lastInsertId(); | |
} | |
function makeStatement ( $sql, $data = null ){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE TABLE php_raw02_post( | |
id int(11) PRIMARY KEY AUTO_INCREMENT, | |
title varchar(100) not null, | |
content varchar(2000) not null | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Inside folder models, we have PageData.class.php: | |
<?php | |
namespace models; | |
class PageData{ | |
public $navigationBar = ""; | |
public $main = ""; | |
} | |
?> | |
//Inside other file, we want to use this class |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<nav class="topnav"> | |
<button class="menu">☰</button> | |
</nav> | |
<div class="mainmenu open"> | |
<div class="innermenu"> | |
<nav> | |
<h2>Click One</h2> | |
<ul> | |
<li><a target="_blank" href="http://codepen.io/mwmwmw/full/03fd8da9b8736277dee5714878bca4f2/" title="Leonardo">Leonardo</a></li> | |
<li><a target="_blank" href="http://codepen.io/mwmwmw/full/03fd8da9b8736277dee5714878bca4f2/" title="Michaelangelo">Michaelangelo</a></li> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<ul class="live-search-list"> | |
<input type="text" class="live-search-box" placeholder="search here" /> | |
<li>Lorem</li> | |
<li>ipsum</li> | |
<li>dolor</li> | |
<li>sit</li> | |
<li>amet</li> | |
</ul> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html> | |
<head> | |
<title>CSS3 ordered list styles - demo</title> | |
<style> | |
body{ | |
margin: 40px auto; | |
width: 500px; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> | |
<title>Example: 5 Ways to Style Unordered Lists</title> | |
<style> | |
html { | |
background-color: #ddd; } | |
body { | |
background-color: #fff; |