Posts

Showing posts from December, 2012

2021 Top 4 Best Upcoming Flagship Smartphones : which are the best mobile phones for you..?

Image
  Hi here are the top 8 best upcoming flagship smartphones of 2021 with high-end level features improved cameras stunning design and many other next-generation technologies will be applied that you will really enjoy also the price and the release date of the smartphones are discussed. Number four Asus Zenfone 8 Number three OnePlus 9 Number two Huawei P50 Number one Apple iPad Pro 12.9

Import UTF-8 languages from Excel to Database using PHP

Step 1 Reading different languages from excel and dump into database require you to make sure following: 1. Database Charset : UTF-8 2. Table Charset : UTF-8 3. Table Columns Charset : UTF-8 ( columns to store foreign language characters must be set to UTF-8) Step 2 Now we need to read Excel and import it into database, there are many libraries can be use to read excel file using php, I used PHPExcel Now, what we need is to setup database connection $cn = mysql_connect('localhost', 'db_user, 'db_password'); $db = mysql_select_db('TableName'); Now before use mysql_query we need to set following mysql_query("SET NAMES utf8"); mysql_query("SET CHARACTER SET utf8"); Now, use mysql_query to INSERT records into database for UTF-8 characters Sample PHP Code using PHPExcel /** Error reporting */ error_reporting(E_ALL); ini_set('display_errors', TRUE); ini_set('display_startup_errors', TRUE); if (PHP_SAPI == &#

How to make back button with php

Just paste this code if (isset($HTTP_REFERER)) { echo "<a href='$HTTP_REFERER'>BACK</a>"; } else { echo "<a href='javascript:history.back()'>BACK</a>"; }