Created
December 9, 2019 02:26
-
-
Save stevesohcot/1c3cd9dd0647e96169c4c8b46940900d to your computer and use it in GitHub Desktop.
PHP Tutorial User Login
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
session_start(); | |
// ***************************** | |
// START Database connection | |
// ***************************** | |
$host = "localhost"; | |
$user = "root"; | |
$password = "root"; | |
$db1 = mysqli_connect($host, $user, $password) | |
or die("Could not connect to database"); | |
mysqli_select_db($db1, "sampleLogin"); | |
// ***************************** | |
// END Database connection | |
// ***************************** | |
$USER_ID = intval($_SESSION['User_ID']); | |
?> | |
<?php function Template_Header() { ?> | |
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Sign Up / Sign In Tutorial</title> | |
<link rel="stylesheet" | |
href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" | |
integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" | |
crossorigin="anonymous"> | |
</head> | |
<body> | |
<?php } ?> | |
<?php function Template_Footer() { ?> | |
</body> | |
</html> | |
<?php } ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment