Indentation fix

This commit is contained in:
William Miceli
2019-11-25 05:57:54 -05:00
parent 1431c5273a
commit acc4dcb4ec

View File

@@ -1,12 +1,12 @@
<?php <?php
session_start(); session_start();
$server = "localhost"; $server = "localhost";
$database = "friendBook"; $database = "friendBook";
$username = "web"; $username = "web";
$password = "Password456"; $password = "Password456";
try{ try{
$connection = new PDO("mysql:host=$server;dbname=$database", $username, $password); $connection = new PDO("mysql:host=$server;dbname=$database", $username, $password);
$connection->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $connection->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
echo "Connected successfully"; echo "Connected successfully";
@@ -32,8 +32,9 @@ try{
header("Location: /login.php"); header("Location: /login.php");
die(); die();
} }
} }
catch(PDOException $e){ catch(PDOException $e){
echo "Error: " . $e->getMessage(); echo "Error: " . $e->getMessage();
} }
$connection = null;
?> ?>