Add About
0) { echo ''; } else { $allowed_extensions = ['jpg', 'jpeg', 'png', 'webp']; $image_path = null; // Handle single file upload if (!empty($_FILES['file']['tmp_name']) && is_uploaded_file($_FILES['file']['tmp_name'])) { $imageno = $_FILES['file']['name']; $extension = strtolower(pathinfo($imageno, PATHINFO_EXTENSION)); if (in_array($extension, $allowed_extensions)) { $ran = rand(9999999, 99999999999); $imagename = $ran . '.' . $extension; $source = $_FILES['file']['tmp_name']; $target = "uploads/" . $imagename; move_uploaded_file($source, $target); $image_path = $target; } else { echo ''; exit; } } // Insert data into the database $query = "INSERT INTO eltra_about (title, short_about, long_about, file) VALUES ('$title', '$short_about', '$long_about', '$image_path')"; $result = mysqli_query($link, $query); if ($result) { echo ''; } else { echo ''; } } } ?>
All About
Deleted successfully.
'; } else { echo ''; } } ?>
Sr No. Title About Image Action
'; } else { echo ''; } ?> Edit