This file contains hidden or 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 | |
$host = 'localhost'; | |
$dbname = 'tutorial_pdo'; | |
$user = 'root'; | |
$pass = ''; | |
try { | |
//$dbh , database handler aka db handler | |
$dbh = new PDO("mysql:host=$host;dbname=$dbname", $user, $pass); |
This file contains hidden or 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 | |
$host = 'localhost'; | |
$dbname = 'tutorial_pdo'; | |
$user = 'root'; | |
$pass = ''; | |
try { | |
//$dbh , database handler aka db handler | |
$dbh = new PDO("mysql:host=$host;dbname=$dbname", $user, $pass); |
This file contains hidden or 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 | |
$host = 'localhost'; | |
$dbname = 'tutorial_pdo'; | |
$user = 'root'; | |
$pass = ''; | |
try { | |
//$dbh , database handler aka db handler | |
$dbh = new PDO("mysql:host=$host;dbname=$dbname", $user, $pass); |
This file contains hidden or 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 | |
$host = 'localhost'; | |
$dbname = 'tutorial_pdo'; | |
$user = 'root'; | |
$pass = ''; | |
try { | |
//$dbh , database handler aka db handler | |
$dbh = new PDO("mysql:host=$host;dbname=$dbname", $user, $pass); |
This file contains hidden or 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 | |
//mssql | |
$dbh = new PDO("mssql:host=$host;dbname=$dbname, $user, $pass"); | |
//sybase | |
$dbh = new PDO("sybase:host=$host;dbname=$dbname, $user, $pass"); | |
//sqlite | |
$dbh = new PDO("sqlite:path/database.db"); |
This file contains hidden or 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 users ( | |
id INT(11) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, | |
username VARCHAR(20) NOT NULL, | |
full_name VARCHAR(80) NOT NULL, | |
password VARCHAR(40) NOT NULL, | |
salt VARCHAR(40) DEFAULT NULL, | |
email VARCHAR(80) NOT NULL | |
) | |
ENGINE InnoDB; |
This file contains hidden or 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 | |
$host = 'localhost'; | |
$dbname = 'tutorial_pdo'; | |
$user = 'root'; | |
$pass = ''; | |
try { | |
//$dbh , database handler aka db handler | |
$dbh = new PDO("mysql:host=$host;dbname=$dbname", $user, $pass); |
This file contains hidden or 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
<script type="text/javascript"> | |
var loc = window.location.hash.substr(1); | |
//start position | |
context.beginPath(); | |
context.arc(190, 450, 10, 0, 2 * Math.PI, false); | |
context.fillStyle = 'white'; | |
context.lineWidth = 2; | |
context.strokeStyle = 'red'; | |
context.stroke(); |
This file contains hidden or 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
<script type="text/javascript"> | |
var loc = window.location.hash.substr(1); | |
if (loc == 'bke01') { | |
context.font = '20px Arial'; | |
context.strokeText('BKE01', 70, 330); | |
context.beginPath(); | |
context.rect(50, 300, 100, 50); | |
context.fillStyle = 'white'; | |
context.lineWidth = 2; | |
context.strokeStyle = 'red'; |
This file contains hidden or 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>Geolocation</title> | |
<meta name="viewport" content="initial-scale=1.0, user-scalable=no"> | |
<meta charset="utf-8"> | |
<style> | |
html, body, #map-canvas { | |
height: 100%; | |
margin: 0px; |