THIS IS THE THE MAIN-PAGE.PHP upon clicking on the add button a modal will appear
this is the add.php code, I don't know how to display the $status on main-page.php because it is in the add.php file.
$run_sql = mysqli_query($conn, $sql) or trigger_error("Query Failed! SQL: $sql - Error: ".mysqli_error($conn), E_USER_ERROR);
if ($run_sql===true){
move_uploaded_file($tmp_profile_img,"upload/$profile_img");
$status = '<div class="alert alert-info alert-dismissible fade show" role="alert">
<strong>The data has been inserted SUCCESSFULLY</strong> You should check in on some of those fields below.
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
</div>';
}
else{
$status = '<div class="alert alert-warning alert-dismissible fade show" role="alert">
<strong>The data was NOT inserted SUCCESSFULLY</strong> Please try again.
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
</div>';
}
header("Location:main-page.php");
?>