Tuesday, 11 April 2017

how to hide input type number arrows


HTML

<input type="number"  placeholder="Mobile Number" >


CSS

input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button 
{ -webkit-appearance: none; -moz-appearance: none; appearance: none; margin: 0; }

ui slider price range in mobile not working


Just add the script after jQuery ui:

<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script> 

<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/jqueryui/1.11.4/jquery-ui.min.js"></script>

 <script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/jqueryui-touch-punch/0.2.3/jquery.ui.touch-punch.min.js"></script>

Saturday, 8 April 2017

Export MySQL data to Excel in PHP

public function actionExportpropertyexcel()
{
$Property = YOUR_SQL_QUERY

$filename = 'HEMANT - '.date('Y-m-d h:i:s').' - List.xls';
//header("Content-type: application/vnd-ms-excel");
header("Pragma: public");
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("Content-Type: application/vnd.ms-excel; charset=UTF-8");
header("Content-Type: application/force-download");
header("Content-Type: application/octet-stream");
header("Content-Type: application/download");
header("Content-Disposition: attachment; filename=".$filename);

echo '<table width="100%" border="1">
<thead>
<tr>
<th>Property id</th>
<th>Property Type</th>
<th>Property Name</th>
<th>Address</th>
<th>Pincode</th>
<th>City</th>
<th>State</th>
<th>Country</th>
<th>Added By</th>
<th>Status</th>
<th>Created On</th>

</tr>
</thead>';
foreach($Property as $prop)
{
echo '
<tr>
<td>'.$prop->id.'</td>
<td>'.$prop->property_type.'</td>
<td>'.$prop->detail->property_name.'</td>
<td>'.$prop->locality.'</td>
<td>'.$prop->pincode.'</td>
<td>'.$prop->city.'</td>
<td>'.$prop->state.'</td>
<td>'.$prop->country.'</td>
<td>'.$prop->property_owner_detail->detail->name.'</td>
<td>'.$prop->status.'</td>
<td>'.$prop->created_at.'</td>
</tr>
';
}
echo '</table>';
}