phpghost.blogspot.com
PHP Ghost: January 2013
http://phpghost.blogspot.com/2013_01_01_archive.html
PHP code and script, useful code and script for PHP Developer. Tuesday, 1 January 2013. Insert data in to table from excel file in php. Open excel file and save as "TAB DELIMITED" text file. In below sample code, "example.txt" is tab-delimited excel file. Now, follow the below instruction for create code for insert data into table in mysql using php. Include 'config.php';. Connect to your database. Fp = fopen("example.txt", "r"); / Open the file('Tab Delimited') for reading. Get the data that we need.
phpghost.blogspot.com
PHP Ghost: Insert data in to table from excel file in php
http://phpghost.blogspot.com/2013/01/insert-data-in-to-table-from-excel-file.html
PHP code and script, useful code and script for PHP Developer. Tuesday, 1 January 2013. Insert data in to table from excel file in php. Open excel file and save as "TAB DELIMITED" text file. In below sample code, "example.txt" is tab-delimited excel file. Now, follow the below instruction for create code for insert data into table in mysql using php. Include 'config.php';. Connect to your database. Fp = fopen("example.txt", "r"); / Open the file('Tab Delimited') for reading.
phpghost.blogspot.com
PHP Ghost: Show/hide div on click event
http://phpghost.blogspot.com/2012/12/showhide-div-on-click-event.html
PHP code and script, useful code and script for PHP Developer. Wednesday, 26 December 2012. Show/hide div on click event. Use below javascript code with you div ID. like "myDivBox". If (document.getElementById("myDivBox").style.display = "block"). Document.getElementById("myDivBox").style.display = "none";. Document.getElementById("myDivBox").style.display = "block";. Add onclick() event on you button or whatever you use to show/hide div. Div id="myDivBox" style="display:none; width :300px".
phpghost.blogspot.com
PHP Ghost: December 2012
http://phpghost.blogspot.com/2012_12_01_archive.html
PHP code and script, useful code and script for PHP Developer. Wednesday, 26 December 2012. Show/hide div on click event. Use below javascript code with you div ID. like "myDivBox". If (document.getElementById("myDivBox").style.display = "block"). Document.getElementById("myDivBox").style.display = "none";. Document.getElementById("myDivBox").style.display = "block";. Add onclick() event on you button or whatever you use to show/hide div. Div id="myDivBox" style="display:none; width :300px".
phpghost.blogspot.com
PHP Ghost: August 2012
http://phpghost.blogspot.com/2012_08_01_archive.html
PHP code and script, useful code and script for PHP Developer. Friday, 31 August 2012. Convert min into hours using php. For converting the min into Hours you can use the following PHP function. Step for using PHP function :. 1) call the function min2hours with parameter total min. 2) and print the return value. If ($mins 0) {. Min = Abs($mins);. Min = $mins;. H = Floor($min / 60);. M = ($min - ($H * 60) / 100;. Hours = $H $M;. If ($mins 0) {. Hours = $hours * (-1);. Expl = explode(".", $hours);.
phpghost.blogspot.com
PHP Ghost: Download/get data into excel file using php
http://phpghost.blogspot.com/2013/01/downloadget-data-into-excel-file-using.html
PHP code and script, useful code and script for PHP Developer. Tuesday, 1 January 2013. Download/get data into excel file using php. Your code for to create your sql statement, we'll call it $query. Get the data that we need. Fetching each row as an array and placing it into a holder array ($aData). While($row = mysql fetch assoc($Result) {. AData[] = $row;. Feed the final array to our formatting function. Contents = getExcelData($aData);. Filename = "myExcelFile.xls";. Code for Save/Open dialog box.
phpghost.blogspot.com
PHP Ghost: Submit form on page load event
http://phpghost.blogspot.com/2012/12/submit-form-on-page-load-event.html
PHP code and script, useful code and script for PHP Developer. Wednesday, 26 December 2012. Submit form on page load event. Add below code into your head section. and change the form id as per your form tag. Document.getElementById('myForm').submit();. Add onload event in to body tag as per below. Subscribe to: Post Comments (Atom). There was an error in this gadget. Add New Tab into Woocommerce and Woothemes. Show/hide div on click event. Submit form on page load event.
phpghost.blogspot.com
PHP Ghost: convert min into hours using php
http://phpghost.blogspot.com/2012/08/convert-min-into-hours-using-php.html
PHP code and script, useful code and script for PHP Developer. Friday, 31 August 2012. Convert min into hours using php. For converting the min into Hours you can use the following PHP function. Step for using PHP function :. 1) call the function min2hours with parameter total min. 2) and print the return value. If ($mins 0) {. Min = Abs($mins);. Min = $mins;. H = Floor($min / 60);. M = ($min - ($H * 60) / 100;. Hours = $H $M;. If ($mins 0) {. Hours = $hours * (-1);. Expl = explode(".", $hours);.