This commit is contained in:
Devdatt Bhatt 2026-05-20 10:16:49 +00:00
parent add6a67a79
commit c0fbc53920
1 changed files with 2 additions and 2 deletions

View File

@ -38,7 +38,8 @@ if (isset($_POST['submit'])) {
$data_to_save[$field] = $_POST[$field] ?? '';
}
file_put_contents($json_file, json_encode($data_to_save, JSON_PRETTY_PRINT));
if (empty($errors))
file_put_contents($json_file, json_encode($data_to_save, JSON_PRETTY_PRINT));
}
?>
@ -138,5 +139,4 @@ function getValue($data, $key)
</div>
</form>
<?php include 'footer.php'; ?>