everything should be db.inc not hardcoded!
This commit is contained in:
parent
d900b2a57f
commit
cbebd4339c
@ -7,7 +7,7 @@
|
|||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<?php
|
<?php
|
||||||
$pdo = new PDO('mysql:host=localhost;dbname=usertable', 'usertable', 'password');
|
include 'db.inc.php';
|
||||||
|
|
||||||
if(!isset($_GET['userid']) || !isset($_GET['code'])) {
|
if(!isset($_GET['userid']) || !isset($_GET['code'])) {
|
||||||
die('<div class="alert alert-warning" role="alert">No code delivered. nothing to do here.</div>');
|
die('<div class="alert alert-warning" role="alert">No code delivered. nothing to do here.</div>');
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
<body>
|
<body>
|
||||||
<?php
|
<?php
|
||||||
session_start();
|
session_start();
|
||||||
$pdo = new PDO('mysql:host=localhost;dbname=usertable', 'usertable', 'password');
|
include 'db.inc.php';
|
||||||
|
|
||||||
function random_string() {
|
function random_string() {
|
||||||
if(function_exists('random_bytes')) {
|
if(function_exists('random_bytes')) {
|
||||||
|
@ -4,6 +4,6 @@ $dbname = 'usertable';
|
|||||||
$dbuser = 'usertable';
|
$dbuser = 'usertable';
|
||||||
$dbpass = 'password';
|
$dbpass = 'password';
|
||||||
$pdo = new PDO('mysql:host='.$mysqlhost.';dbname='.$dbname.'', $dbuser , $dbpass);
|
$pdo = new PDO('mysql:host='.$mysqlhost.';dbname='.$dbname.'', $dbuser , $dbpass);
|
||||||
|
//$pdo = new PDO('mysql:host=localhost;dbname=usertable', 'usertable', 'password');
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<?php
|
<?php
|
||||||
$pdo = new PDO('mysql:host=localhost;dbname=usertable', 'usertable', 'password');
|
include 'db.inc.php';
|
||||||
|
|
||||||
function random_string() {
|
function random_string() {
|
||||||
if(function_exists('random_bytes')) {
|
if(function_exists('random_bytes')) {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
<?php
|
<?php
|
||||||
session_start();
|
session_start();
|
||||||
$pdo = new PDO('mysql:host=localhost;dbname=usertable', 'usertable', 'password');
|
include 'db.inc.php';
|
||||||
|
|
||||||
if(isset($_GET['login'])) {
|
if(isset($_GET['login'])) {
|
||||||
$username = $_POST['username'];
|
$username = $_POST['username'];
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
<?php
|
<?php
|
||||||
session_start();
|
session_start();
|
||||||
$pdo = new PDO('mysql:host=localhost;dbname=usertable', 'usertable', 'password');
|
include 'db.inc.php';
|
||||||
?>
|
?>
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<?php
|
<?php
|
||||||
$pdo = new PDO('mysql:host=localhost;dbname=usertable', 'usertable', 'password');
|
include 'db.inc.php';
|
||||||
|
|
||||||
if(!isset($_GET['userid']) || !isset($_GET['code'])) {
|
if(!isset($_GET['userid']) || !isset($_GET['code'])) {
|
||||||
die('<div class="alert alert-warning" role="alert">No code delivered. nothing to do here.</div>');
|
die('<div class="alert alert-warning" role="alert">No code delivered. nothing to do here.</div>');
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
session_start();
|
session_start();
|
||||||
//$pdo = new PDO('mysql:host=localhost;dbname=usertable', 'usertable', 'password');
|
|
||||||
include 'db.inc.php';
|
include 'db.inc.php';
|
||||||
$username = $_SESSION['username'];
|
$username = $_SESSION['username'];
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user