<?php

$stock_id = $_GET['stock_id'];
$chassis = $_GET['chassis'];

$mysqli = new mysqli("localhost","root","","inspection");

// Check connection
if ($mysqli -> connect_errno) {
  echo "Failed to connect to MySQL: " . $mysqli -> connect_error;
  exit();
}else{

    $insert = "INSERT INTO `inspection_cars`(`id`, `Stock_id`) VALUES (DEFAULT,$stock_id)";
   if( $mysqli->query($insert) === TRUE){

      echo "Record updated successfully";


   }else{
        echo "Error updating record: " . $mysqli->error;
   }




}


?>
