Is it possible to automate the process of uploading CSV files to the server using a button click in PHP?

Yes, it is possible to automate the process of uploading CSV files to the server using a button click in PHP. You can achieve this by creating a form with an input type of "file" for selecting the CSV file, and then using PHP to handle the file upload process when the form is submitted. You can use the move_uploaded_file function to move the uploaded file to a specific directory on the server.

<?php
if(isset($_POST['submit'])){
    $file = $_FILES['csv_file']['tmp_name'];
    $destination = 'uploads/' . $_FILES['csv_file']['name'];
    
    if(move_uploaded_file($file, $destination)){
        echo "File uploaded successfully.";
    } else {
        echo "Error uploading file.";
    }
}
?>

<form method="post" enctype="multipart/form-data">
    <input type="file" name="csv_file">
    <input type="submit" name="submit" value="Upload CSV">
</form>