0
0
mirror of https://github.com/Doodle3D/doodle3d-connect.git synced 2024-12-25 18:13:48 +01:00
doodle3d-connect/connect.php

18 lines
434 B
PHP
Raw Normal View History

2013-09-27 01:38:44 +02:00
<?php
2013-09-30 17:34:27 +02:00
require 'credentials.php';
2013-09-27 01:38:44 +02:00
$database = "doodle3d_connect";
$dsn = "mysql:host=localhost;dbname=$database";
$table = "signins";
try {
$db = new PDO($dsn, $username, $password);
$db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
} catch (PDOException $e) {
$response = array( "status" => "error",
"msg" => $e->getMessage()." (".$e->getCode().")");
exit(json_encode($response)."\r\n");
}
2013-09-27 01:38:44 +02:00
?>