chiro-canto/public/upload/submitobservation.php

27 lines
571 B
PHP
Raw Normal View History

2021-03-28 20:40:17 +02:00
<?php
session_start();
$root = realpath($_SERVER["DOCUMENT_ROOT"]);
require($root."/database/credentials.php");
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
// Connect the database
try{
$db = new PDO("mysql:host=$host;dbname=$database;charset=utf8",
$user,
$password,
array(PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION
));
}catch (Exception $e){
die("Error : ".$e->getMessage());
}
2021-03-29 19:35:47 +02:00
// /* Create Table if not exists */
// $sql = file_get_contents($root."/database/create_record.sql");
// $db->exec($sql);
2021-03-28 20:40:17 +02:00
?>