GIF89a php
Current File : /home/hencockfreshchic/public_html/erp/excel2.php
<?php
ob_start();
ini_set('error_reporting', E_STRICT);
include("connect.php");
$output = '';

	
$sql = "SELECT * from `user_details`";
$result = mysqli_query($conn, $sql) or die (mysqli_error());
	if(mysqli_num_rows($result)>0)
	{
		$output .= '
		<table class="table" bordered="1">
		<tr>
		<td><strong>Sr</strong></td>
	
		</tr>		
		
		';
		while($row=mysqli_fetch_array($result))
		{
			$output .=' 
			<tr>
			<td>'.$row['sr'].'</td>
	
	
			
			</tr>		
			';
			}
		$output .='</table>';
		header("Content-Type: application/xls");
		header("Content-Disposition: attachment; filename=download.xls");
	 
			echo $output;
		
	}
	


?>