Inserting data to your database and getting all the data when required is a much needed operation in websites maintenance or development. So making all these operations easy is really needy.
I am presenting you a PHP script to export mysql to excel sheet and download. Script is orginally written by Oliver Schwarz <firstname.lastname@example.org>
Following are the script to call the class file and produce the output. Just download the php file and class file and follow the following steps,
1 : Create Download Link
<a href=”export.php”>Export To Excel</a>
2 : Include the .class file to “php-excel.php”
// load library
3 : Include db file for database connection
// load your db file for databse connection
4 : Set your column names for excel file
// create a simple 2-dimensional array
$data_array = array(
5 : Create loop to fetch data and write to excel file
$sql = mysql_query("SELECT * FROM `tbl_students` WHERE 1");
while($data = mysql_fetch_object($sql))
6 : Create Excel File & Export MySQL to Excel
// generate file (constructor parameters are optional)
// final step of mysql to excel export
$xls = new Generate_Excel_XML('UTF-8', false, 'Student Information');
Its so easy and handy to use. Download Export-To-Excel.zip
You need to add the jQuery.ui.js file to enable your UI integration. And for the styles you need to include ui.css files. Switching with the themes is little difficult you you are downloading the files from the jQuery.ui site and including it to your html page.
A more easy way is there to play with all the themes provided by jQuery.ui without downloading all of them. Below are the live urls of the ui.css files for all the themes. Just put these urls in your scripting include and the ui theme for whole site will be changed and you can see the reflection at that instance.
Script to include your JS files to enable jQuery and jQuery UI Themes for your site,
Now add you css file for UI CSS. The url should be chnaged to change the UI theme,
<link rel=”stylesheet” type=”text/css” href=”DYNAMIC URL HERE” media=”screen” />
Now find below your desired theme and place that URL into the above code.
All the css can be managed in the database also and you can have a nice UI theme chnager option for your site. I hope this post will help will somewhat.
You always wanted to hide your personal and confidential data from unknown or strangers eyes but using any software may charge you, here is a trick from which you can easily hide your content.
The most important thing is that, once hidden with this method, the files/folders cannot be viewed by any search options even if you click “Show All Hidden Files and Folders”.
You can now easily hide your files or folders through Command Prompt. It will be impossible for others to find the file or folder unless they know the file name or folder name. You can secure your documents easily by this method. Make sure you remember the file or folder name!
Hiding the most wanted files and folders is very important nowadays and it’s really a tedious job too. In order to make this tedious job an easy one, I’m going to deliver you this trick now.
Step 1 : Open Command Prompt
Hit Windows + R key on keyboard to enter into “RUN” mode.
Type “cmd” and hit Enter.
Step 2 : Navigate To Desired Drive And Hide Item
In my case my folder “Private” is present inside E:
Now switch to command prompt and type “E:” and Hit Enter. You are now in E drive.
Here is your original command,
attrib +s +h Private
Otherwise you can directly enter the following command without switching to the drive E in following way,
attrib +s +h E:Private
step 3 : Unhide Your Item
In this trick you have to remember your folder or file name in order unhide, because you can not even find the item after you choose “Display Hidden Files And Folders”. Type the same code with (-) symbol.
attrib -s -h E:Private
Step 4 : Find Your Item In Emergency
Create a “sample.zip” file in you drive and navigate to that folder to view all the hidden files applied through the command prompt,
I hope this trick will somewhat useful for you.