PHP File going to Microsoft Excel “The file is corrupt and cannot be opened” [solved]

Encoutered this issue with a website I was working on. When i convert the data to excel it comes out with message “The file is currpt and cannot be opened”.

When I tried to do research I found a page that says you open the file using notepad and then save it. Once done, you can open it normally.

To my end I was able to solve it by moving the access codes (user , password , database) of the mysql to the actual page itself. Usually I reference it from another php page. But this time, moving it solved my problem

Hope this helps somebody out there

Coffee Cup

Bootstrap Website showing Date Picker using PHP

Configurable-Date-Picker-Plugin-For-Bootstrap

Using angular, a few of the requests were to make the date into a date picker. I have found the code and wanted to share it here

Enjoy,

Coffee Cup

<script   src="https://code.jquery.com/jquery-2.2.3.min.js"   integrity="sha256-a23g1Nt4dtEYOj7bR+vTu7+T8VP13humZFBJNIYoEJo="   crossorigin="anonymous"></script>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous">
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js" integrity="sha384-0mSbJDEHialfmuBBQP6A4Qrprq5OVfW37PRR3j5ELqxss1yVqOtnepnHVP9aJ7xS" crossorigin="anonymous"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.6.0/js/bootstrap-datepicker.min.js"></script>
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.6.1/css/bootstrap-datepicker3.min.css">

<script>
$( document ).ready(function() {
    $("#from-datepicker").datepicker({ 
        format: 'yyyy-mm-dd'
    });
    $("#from-datepicker").on("change", function () {
        var fromdate = $(this).val();
        alert(fromdate);
    });
}); 
</script>

	<div class="form-group">
		<label>Date</label>
		<input type="text" id="from-datepicker"/>
	</div>

How to change table row count in the bootstrap website?

I have been working with bootstrap websites for quite some time and making admin backend pages have been a new experience for me.

Lately the default 10 row table data have a lot of people ask if we can increase it to a certain number other than 10.

Fortunately, I came across the code to grant this request. But we need to go into the source code page to accomplish this.

Inside the HTML page, at the bottom, you will see a script section

We need to add more code to it.

When you refresh the page, you will see that it now starts at 50 rows

That’s just about it.

Enjoy,

Coffee Cup

Youtube link is
https://www.youtube.com/watch?v=GdH3IkYBwI4