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