prepare("INSERT INTO `cars`(`year`,`make`,`model`,`color`,`price`) VALUES(:year, :make, :model, :color, :price);"); $result = $stmt->execute(array(":year" => $_POST['year'],":make" => $_POST['make'],":model" => $_POST['model'],":color" => $_POST['color'],":price" => $_POST['price'])); if($result) { echo 'New record was saved.'; }else{ echo 'Error occurred'; } } ?>

Year:

Make:

Model:

Color:

Price: