core/functions.php
/* Return a PDO connexion to the server */
Return a PDO connexion to the server
Return a PDO connexion to the server
function db_connexion()
	{
		try
		{
			$conn = new PDO('mysql:host=localhost; dbname=1415he201041; charset=utf8', 'MONROE', 'Samuel');
			$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
			return $conn;
		}
		catch(Exception $e)
		{
			die('Erreur : '.$e->getMessage());
			echo 'Database connexion failed';
		}
	}
function db_connexion ( ) { try { $ conn = new PDO ( 'mysql:host=localhost; dbname=1415he201041; charset=utf8' , 'MONROE' , 'Samuel' ) ; $ conn -> setAttribute ( PDO :: ATTR_ERRMODE , PDO :: ERRMODE_EXCEPTION ) ; return $ conn ; } catch ( Exception $ e ) { die ( 'Erreur : ' . $ e -> getMessage ( ) ) ; echo 'Database connexion failed' ; } }
Return a PDO connexion to the server
Return a PDO connexion to the server