Indentation fix
This commit is contained in:
@@ -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;
|
||||||
?>
|
?>
|
||||||
Reference in New Issue
Block a user