Creating an autocomplete field | Setting up the backend | Part 1
Step 1 - Getting the Pincode list

Step 2 - Setting up MySQL database
The columns available for inserting data are:
officename,pincode,officeType,Deliverystatus,divisionname,regionname,circlename,Taluk,Districtname,statename
I will be using only 'pincode', 'Taluk', 'Districtname', 'Statename' here to avoid any unnecessary cluttering.

Step 3 - Writing the PHP script to enumerate database
<?php
$file = fopen("pincodes.csv", "r") or die("Open file");
$server = "localhost";
$username = "root";
$password = "password";
$db = "turnouts";
$conn = mysql_connect($server, $username, $password);
mysql_select_db("turnouts") or die();
if(!$conn) {
die("Connection failed: " . mysqli_connect_error());
}
while(!feof($file)) {
$line = fgets($file);
$words = explode(",", $line);
$pincode = $words[1];
$taluka = $words[7];
$district = $words[8];
$state = $words[9];
$sql = "INSERT INTO pincode (pincode, taluka, district, state) VALUES ('$pincode', '$taluka', '$district', '$state')";
mysql_query($sql, $conn);
mysql_error($conn);
}
fclose($file);
mysql_close($conn);
?>
This code will take some time to execute. On my low end box, it took 90 minutes approx. After having executed, you should have a database with some real data. Here's the row count, a whooping 154,797.

Now that we have our database setup, we are all set to write the front end. To make it easy to follow, I will write it in the second part of this series.
Edit: Here is the Part 2 Enjoy!