I'm Using PHPExcel where I need to upload the excel to the database for less hassle of work but No errors show up and If I click Insert I will be able to see the information of that excel see the below picture for more information
https://i.stack.imgur.com/gq1x3.png This is my table where the books will put this after import but nothing happens.
$file_name = $_FILES["excel"]["name"];
$array = explode('.', $file_name);
$extension = end($array); // For getting Extension of selected file
$allowed_extension = array("xls", "xlsx", "csv"); //allowed extension
if(in_array($extension, $allowed_extension)) //check selected file extension is present in allowed extension array
{
$file = $_FILES["excel"]["tmp_name"]; // getting temporary source of excel file
include("Classes/PHPExcel/IOFactory.php"); // Add PHPExcel Library in this code
$html = "
";
$objPHPExcel = PHPExcel_IOFactory::load($file); // create object of PHPExcel library by using load() method and in load method define path of selected file
I'm Using PHPExcel where I need to upload the excel to the database for less hassle of work but No errors show up and If I click Insert I will be able to see the information of that excel see the below picture for more information https://i.stack.imgur.com/gq1x3.png This is my table where the books will put this after import but nothing happens.
https://i.stack.imgur.com/o0dAl.png this is the excel that i want to import
`$dbcon = mysqli_connect('localhost', 'root', '', 'sti_lms'); if(isset($_POST["import"])) {
$file_name = $_FILES["excel"]["name"]; $array = explode('.', $file_name); $extension = end($array); // For getting Extension of selected file $allowed_extension = array("xls", "xlsx", "csv"); //allowed extension if(in_array($extension, $allowed_extension)) //check selected file extension is present in allowed extension array { $file = $_FILES["excel"]["tmp_name"]; // getting temporary source of excel file include("Classes/PHPExcel/IOFactory.php"); // Add PHPExcel Library in this code $html = "