i have to trouble trying to debug this code and i know it´s something on line 26 and i have tried different methods to solve it like changing it to mysql and defining db
<?php
session_start();
include('connection.php');
if(isset($_POST['Login']))
{
include ('/ClassLogin.php');
$login = new Login();
if
($login->isLoggedIn())
header('location: indeks.html');
else
$login->showErros ();
}
$Token = $_SESSION['token'] = md5(uniqid(mt_rand(),TRUE));
$username = $_POST["username"];
$password = $_POST["password"];
$sql = "SELECT id FROM $tbl WHERE username = '$username' and password = '$password'";
class db extends mysqli
{
function __construct($localhost, $username, $password, $pokemon7_users, $port=80){
mysqli::__construct($localhost, $username, $password, $pokemon7_users, $port);
}
$result = mysqli($db, $sql, $link);
if (!result)
{
printf("Error: ", mysql_error($link));
}
else
{
Echo "Congratulations you are now logged in";
}