There is a form that sends data to the database. After successful sending a message appears that the data has been added. It is necessary to make sure that after successful submission and addition of data I was not sent to the page with the message, but left on the same page (index.php).
File form.php
<?php require 'connect.php'; mysql_query("SET NAMES utf8"); $id = trim($_REQUEST['id']); $date = trim($_REQUEST['date']); $name = trim($_REQUEST['name']); $phone = trim($_REQUEST['phone']); $address = trim($_REQUEST['address']); $contract_number = trim($_REQUEST['contract_number']); $login = trim($_REQUEST['login']); $credit_amount = trim($_REQUEST['credit_amount']); $months = trim($_REQUEST['months']); $start_amount = trim($_REQUEST['start_amount']); $balance = trim($_REQUEST['balance']); $monthly_payment = trim($_REQUEST['monthly_payment']); $rate = trim($_REQUEST['rate']); $total = trim($_REQUEST['total']); $insert_sql = "INSERT INTO abons_table (id, date, name, phone, address, contract_number, login, credit_amount, months, start_amount, balance, monthly_payment, rate, total)" . "VALUES ('{$id}', '{$date}', '{$name}', '{$phone}', '{$address}', '{$contract_number}', '{$login}', '{$credit_amount}', '{$months}', '{$start_amount}', '{$balance}', '{$monthly_payment}', '{$rate}', '{$total}');"; mysql_query($insert_sql) or die (mysql_error()); //if(isset($_REQUEST['submit'])){} if ($insert_sql=='true') { //header('Location: localhost/bospor/index.php'); echo '<meta http-equiv="refresh" content="0; url=localhost/bospor/index.php">'; } echo "<p>Addition successful</p>"; ?> Tried in several ways (at the very end). Did not work out. Please tell me what could be wrong.

