sheets()); echo "You have total ".$totalSheet." sheets". $html=""; /* For Loop for all sheets */ for($i=0;$i<$totalSheet;$i++){ $Reader->ChangeSheet($i); foreach ($Reader as $Row) { $html.=""; $title = isset($Row[0]) ? $Row[0] : ''; $description = isset($Row[1]) ? $Row[1] : ''; $html.=""; $html.=""; $html.=""; $html.=""; $html.=""; $html.=""; $html.=""; $html.=""; $html.=""; $html.=""; $html.=""; $html.=""; $html.=""; $html.=""; $html.=""; $html.=""; $html.=""; $html.=""; $html.=""; $html.=""; $html.=""; $html.=""; $html.=""; $html.=""; $html.=""; $html.=""; $html.=""; $html.=""; $html.=""; $html.=""; $html.=""; $html.=""; $html.=""; $html.=""; $html.=""; $html.=""; $html.=""; $html.=""; $html.=""; $html.=""; $html.=""; $html.=""; $html.=""; $html.=""; $html.=""; $html.=""; $html.=""; $html.=""; $html.=""; $html.=""; $html.=""; $query = "insert into soil_records( analysis_type, lab_no, batch_no, sample_id, site_id, crop, date_sampled, lab_no, batch_no, sample_id, site_id, tec, cec, texture, gravel, colour, NO3_N, NH3_N, p_mehlick, p_bray2, p_morgan, k_morgan, ca_morgan, mg_morgan, na_morgan, ch_h2o, ocarbon, omatter, fe, ec, ph_cacl2, ph_h2o, paramag, s_morgan, b_cacl2, mn_dtpa, zn_dtpa, fe_dtpa, cu_dtpa, al, sl_cacl2, m_dtpa, co_dtpa, se, ca_mehlick3, mg_mehlick3, k_mehlick3, na_mehlick3, al_mehlick3 ) values( '" . $analysis_type . "', '" . $lab_no . "', '" . $batch_no . "', '" . $sample_id . "', '" . $site_id . "', '" . $crop . "', '" . $date_sampled . "', '" . $lab_no . "', '" . $batch_no . "', '" . $sample_id . "', '" . $site_id . "', '" . $tec . "', '" . $cec . "', '" . $texture . "', '" . $gravel . "', '" . $colour . "', '" . $NO3_N . "', '" . $NH3_N . "', '" . $p_mehlick . "', '" . $p_bray2 . "', '" . $p_morgan . "', '" . $k_morgan . "', '" . $ca_morgan . "', '" . $mg_morgan . "', '" . $na_morgan . "', '" . $ch_h2o . "', '" . $ocarbon . "', '" . $omatter . "', '" . $fe . "', '" . $ec . "', '" . $ph_cacl2 . "', '" . $ph_h2o . "', '" . $paramag . "', '" . $s_morgan . "', '" . $b_cacl2 . "', '" . $mn_dtpa . "', '" . $zn_dtpa . "', '" . $fe_dtpa . "', '" . $cu_dtpa . "', '" . $al . "', '" . $sl_cacl2 . "', '" . $m_dtpa . "', '" . $co_dtpa . "', '" . $se . "', '" . $ca_mehlick3 . "', '" . $mg_mehlick3 . "', '" . $k_mehlick3 . "', '" . $na_mehlick3 . "', '" . $al_mehlick3 . "' )"; $mysqli->query($query); } } $html.="
".id."".analysis_type."".lab_no."".batch_no."".sample_id."".site_id."".crop."".date_sampled."".lab_no."".batch_no."".sample_id."".site_id."".tec."".cec."".texture."".gravel."".colour."".NO3_N."".NH3_N."".p_mehlick."".p_bray2."".p_morgan."".k_morgan."".ca_morgan."".mg_morgan."".na_morgan."".ch_h2o."".ocarbon."".omatter."".fe."".ec."".ph_cacl2."".ph_h2o."".paramag."".s_morgan."".b_cacl2."".mn_dtpa."".zn_dtpa."".fe_dtpa."".cu_dtpa."".al."".sl_cacl2."".m_dtpa."".co_dtpa."".se."".ca_mehlick3."".mg_mehlick3."".k_mehlick3."".na_mehlick3."".al_mehlick3."
"; echo $html; echo "
Data Inserted in dababase"; }else { die("
Sorry, Incorrect file."); } }