I have used multiple forms on the site having the exact same config however, i'm specifically facing issue with this form.
Source code:
<?php
if (!$_POST['assessment-occupation'] || !$_POST['assessment-highest-qualification'] || !$_POST['assessment-experience']) {
echo "<p>Please supply all of the data!</p>";
exit;
} else {
require('db-connection.php');
//require('file-upload-script.php');
try {
session_start();
$stmt = $conn->prepare("UPDATE visa SET job_title= :assessment-occupation, Qualifications= :assessment-highest-qualification, experience= :assessment-experience, comments= :assessment-comments WHERE id= :id");
// escape variables for security
$stmt->bindParam(':assessment-occupation', $_POST['assessment-occupation']);
$stmt->bindParam(':assessment-highest-qualification', $_POST['assessment-highest-qualification']);
$stmt->bindParam(':assessment-experience', $_POST['assessment-experience']);
//$stmt->bindParam(':file_upload', $target_file);
$stmt->bindParam(':assessment-comments', $_POST['assessment-comments']);
$stmt->bindParam(':id', $_SESSION["regId"]);
$stmt->execute();
} catch (PDOException $e) {
echo $e->getMessage();
}
}