I am having an issue in inserting into a table. The connection file is correct and is coming from the header.php. There are no errors but when I go within the table no records are being inserted.
<?php
include('header2.php');
if(isset($_POST['done'])) {
$title = $_POST['title'];
$description = $_POST['description'];
$link = $_POST['link'];
$company = $_POST['company'];
$sql = "INSERT INTO placements (title, description, link, company)
VALUES ('$title', '$description', '$link','$company')";
// use exec() because no results are returned
echo "New record created successfully";
}
?>
<html>
<head>
<title> Add a Placement </title>
</head>
<body>
<form method="post">
<input type="text" name="title" placeholder="title">
<input type="text" name="description" placeholder="description">
<input type="text" name="company" placeholder="company">
<input type="text" name="link" placeholder="link">
<input type="submit" name="done">
</form>
</body>
</html>