<?php
include '../inc/db.php';
if ($conn->connect_error) die("Connection failed");

$width = $_POST['width'];
$length = $_POST['length'];
$depth_in = $_POST['depth_in'];
$depth_ft = $_POST['depth_ft'];
$cubic_feet = $_POST['cubic_feet'];
$cubic_yards = $_POST['cubic_yards'];
$tons = $_POST['tons'];
$material = $_POST['material'];
$token = $_POST['token'];

$stmt = $conn->prepare("INSERT INTO aggregate_calculations(width,length,depth_in,depth_ft,cubic_feet,cubic_yards,tons,material,user_token) VALUES (?,?,?,?,?,?,?,?,?)");
$stmt->bind_param("dddddddss", $width,$length,$depth_in,$depth_ft,$cubic_feet,$cubic_yards,$tons,$material,$token);
$stmt->execute();
$stmt->close();
$conn->close();
?>