bank.ls, bank.balance, bank.date
FROM bank
$stmt = $pdo->prepare('SELECT Client.id, Client.surname, Client.name, Client.patron, Client.serie, Client.number, Client.propiska, Client.telephone, bank.ls, bank.balance, bank.date
FROM bank INNER JOIN Client ON bank.id = Client.id :current_page, :record_per_page');
$stmt->bindValue(':current_page', ($page-1)*$records_per_page, PDO::PARAM_INT);
$stmt->bindValue(':record_per_page', $records_per_page, PDO::PARAM_INT);
$stmt->execute();
<tr>
<td></td>
<td><?=$contact['id']?></td>
<td><?=$contact['surname']?></td>
<td><?=$contact['name']?></td>
<td><?=$contact['patron']?></td>
<td><?=$contact['serie']?></td>
<td><?=$contact['number']?></td>
<td><?=$contact['propiska']?></td>
<td><?=$contact['telephone']?></td>
<td class="actions">
$name = isset($_POST['name']) ? $_POST['name'] : '';
$adress = isset($_POST['adress']) ? $_POST['adress'] : '';
$phone = isset($_POST['phone']) ? $_POST['phone'] : '';
$gas = isset($_POST['gas']) ? $_POST['gas'] : '';
$water = isset($_POST['water']) ? $_POST['water'] : '';
$electro = isset($_POST['electro']) ? $_POST['electro'] : '';
// Insert new record into the contacts table
$stmt = $pdo->prepare('INSERT INTO contacts VALUES (?, ?, ?, ?, ?, ?, ?)');
$stmt->execute([$id, $name, $adress, $phone, $gas, $water, $electro]);
ini_set('error_reporting', E_ALL);
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
<?php
function pdo_connect_mysql() {
$DATABASE_HOST = 'localhost';
$DATABASE_USER = 'root';
$DATABASE_PASS = 'root';
$DATABASE_NAME = 'user';
try {
return new PDO('mysql:host=' . $DATABASE_HOST . ';dbname=' . $DATABASE_NAME . ';charset=utf8', $DATABASE_USER, $DATABASE_PASS);
setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);