'/var/www/html/app_ad.png',
'app_logo' => '/var/www/html/app_logo.png'
@@ -112,15 +113,14 @@ function getValue($data, $key) {
$errors[] = "File for $input_name must be a PNG.";
} else {
if (move_uploaded_file($_FILES[$input_name]['tmp_name'], $destination)) {
- echo "
$input_name uploaded successfully.
";
+ // Success
} else {
- $errors[] = "Failed to upload $input_name. Check folder permissions.";
+ $errors[] = "Failed to upload $input_name.";
}
}
}
}
- // Save text data to JSON
$text_fields = [
'channel_name', 'office_address', 'contact_details', 'enforcement_officer',
'eo_contact_details', 'company_name', 'cin_number', 'gstin_number'
@@ -133,21 +133,21 @@ function getValue($data, $key) {
if (empty($errors)) {
if (file_put_contents($json_file, json_encode($data_to_save, JSON_PRETTY_PRINT))) {
- echo "
All data and files processed successfully!
";
- // Refresh to show updated data in form
+ echo '
All data and files processed successfully!
';
echo "";
} else {
- $errors[] = "Failed to save JSON data. Check folder permissions.";
+ $errors[] = "Failed to save JSON data.";
}
}
if (!empty($errors)) {
foreach ($errors as $error) {
- echo "
$error
";
+ echo "
$error
";
}
}
}
?>
+