<?php

require_once 'functions.php';
$functs = new funcs();
$login = "";
$pass = "";
$error = "";
if (isset($_POST["submitbutton"])) {
    $login = $_POST['login'];
    $pass = $_POST['pass'];
    if ($res = $functs->user_exist($login, $pass)) {
        $functs->login($res);
        header("Location: profile.php");
    } else {
        $error = 1;
    }
}
?>
<html>
<head>
    <meta charset="utf-8">
    <link rel="stylesheet" type="text/css"
          href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.6/css/bootstrap.min.css">
    <link rel="stylesheet" type="text/css" href="css/main.css">
</head>
<body>
<form class="container" method="post">
    <div class="col-sm-4 centered">
        <div class="row titleForms">Enter</div>
        <div class="row">
            <table class="tableForms">