index.html

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <form method="POST" action="strona.php">
        <label for="marka">Marka</label>
        <input type="text" name="marka">
        <label for="model">Model</label>
        <input type="text" name="model">
        <label for="rok">Rok</label>
        <input type="number" name="rok">
        <input type="submit" value="Wyślij">
    </form>
</body>
</html>

strona.php

<?php
$connect=mysqli_connect('localhost','root','','salon');
$marka=$_POST['marka'];
$model=$_POST['model'];
$rok=$_POST['rok'];
$sql="INSERT INTO samochody VALUES (NULL, '$marka', '$model', $rok);";
$query=mysqli_query($connect,$sql);
echo $marka;
echo $model;
echo $rok;
mysqli_close($connect);
?>