mirror of
https://github.com/Doodle3D/doodle3d-connect.git
synced 2024-11-05 15:13:23 +01:00
18 lines
447 B
PHP
18 lines
447 B
PHP
<?php
|
|
|
|
$database = "doodle3d_connect";
|
|
$dsn = "mysql:host=localhost;dbname=$database";
|
|
$username = "root";
|
|
$password = "mysql";
|
|
$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");
|
|
}
|
|
?>
|