<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-6961899971002546823</id><updated>2026-06-09T12:10:46.463+05:30</updated><category term=".htaccess"/><category term=".mdb file to .sql file"/><category term="DSN"/><category term="Data Source Name"/><category term="INTRODUCTION TO CODING PLATFORM BLOG"/><category term="Internet Explorer 9"/><category term="Joomla"/><category term="Joomla 3 installation issue on WAMP 2.4"/><category term="MS Access"/><category term="Migrate MS Access database (.mdb) to MySQL  (.sql) database"/><category term="MySQL"/><category term="MySQL ODBC Connector"/><category term="PHP Redirection - Anchor link problem in INTERNET explorer"/><category term="Simple Pagination Script in PHP"/><category term="Sorting a multidimensional associative array in PHP"/><category term="TinyMCE issue with IE9"/><category term="URL Rewriting"/><category term="URL extraction"/><category term="WAMP"/><category term="anchor link"/><category term="array in PHP"/><category term="associative"/><category term="coding platform"/><category term="data extraction"/><category term="database"/><category term="export database from MS Access"/><category term="facebook"/><category term="google map"/><category term="internet explorer"/><category term="migration"/><category term="multidimensional"/><category term="next and previous links"/><category term="pagination script"/><category term="php"/><category term="php header"/><category term="post method"/><category term="programming"/><category term="redirect"/><category term="sorting"/><category term="sorting an array of arrays by the keys of sub-arrays"/><category term="textarea with tinyMCE controls"/><category term="web development"/><title type='text'>Coding Platform</title><subtitle type='html'>This blog is all about web development coding lessons and tricky things and their solutions. It serves as the Coding Platform for programmers.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://thecodingplatform.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6961899971002546823/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://thecodingplatform.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>testing</name><uri>http://www.blogger.com/profile/03705416234539295633</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>10</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-6961899971002546823.post-7473007723373089253</id><published>2017-10-21T15:05:00.003+05:30</published><updated>2017-10-21T15:59:21.463+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term=".mdb file to .sql file"/><category scheme="http://www.blogger.com/atom/ns#" term="Data Source Name"/><category scheme="http://www.blogger.com/atom/ns#" term="database"/><category scheme="http://www.blogger.com/atom/ns#" term="DSN"/><category scheme="http://www.blogger.com/atom/ns#" term="export database from MS Access"/><category scheme="http://www.blogger.com/atom/ns#" term="Migrate MS Access database (.mdb) to MySQL  (.sql) database"/><category scheme="http://www.blogger.com/atom/ns#" term="migration"/><category scheme="http://www.blogger.com/atom/ns#" term="MS Access"/><category scheme="http://www.blogger.com/atom/ns#" term="MySQL"/><category scheme="http://www.blogger.com/atom/ns#" term="MySQL ODBC Connector"/><title type='text'>Migrate MS Access database (.mdb) to MySQL  (.sql) database using MySQL ODBC Connector</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Hello coders, this blog post provides information about conversion of &lt;b&gt;MS Access Database to MySQL database&lt;/b&gt;. First of all, here is a brief overview of the need to migrate .mdb file to .sql file.&lt;br /&gt;
&lt;br /&gt;
- Microsoft Access is used as Database Management System (DBMS) for Windows Desktop Applications. Now, suppose that you have created a similar application on Web and you want to use same database as used in Windows Application.&lt;br /&gt;
- You can not use the database created in Microsoft Access on Web Server as it is. You have the following options for using the same database for your Web Application.&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;&lt;b&gt;Using Microsoft SharePoint&lt;/b&gt; – MS Access can be used on SharePoint to build Web Database Applications.&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Migrating MS Access database to Web based database&lt;/b&gt;, i.e, MySQL, MS SQL Server or others. This post discusses about this method.&lt;/li&gt;
&lt;/ul&gt;
If the conversion of .mdb file can be done to .sql file, then the .sql can be imported to any Web based database. There are online tools available for this. But this blog post discusses about migration without using online available tools.&lt;br /&gt;
Now, we will explain how to migrate .mdb file (MS Access database)  to .sql file.&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
For this migration, we will export tables from &lt;b&gt;MS Access to MySQL database using  MySQL ODBC connector&lt;/b&gt;. There is a full documentation on MySQL ODBC connector on MySQL developer website at the following URL:&lt;br /&gt;
&lt;a href=&quot;https://dev.mysql.com/doc/connector-odbc/en/connector-odbc-introduction.html&quot; target=&quot;_blank&quot;&gt;https://dev.mysql.com/doc/connector-odbc/en/connector-odbc-introduction.html&lt;/a&gt;.&lt;br /&gt;
&lt;ol style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;MySQL ODBC connector can be downloaded from the following URL:&lt;br /&gt;&lt;a href=&quot;https://dev.mysql.com/downloads/connector/odbc/5.3.html&quot; target=&quot;_blank&quot;&gt;https://dev.mysql.com/downloads/connector/odbc/5.3.html&lt;/a&gt;. Here, you can download it according to your operating system.&amp;nbsp;&lt;/li&gt;
&lt;li&gt;After installing MySQL ODBC connector, it needs to be configured to create a &lt;b&gt;Data Source Name (DSN)&lt;/b&gt;.  The documentation to create DSN using &lt;b&gt;ODBC Data Source Administrator&lt;/b&gt; on Windows can be found at &lt;a href=&quot;https://dev.mysql.com/doc/connector-odbc/en/connector-odbc-configuration-dsn-windows-5-2.html&quot; target=&quot;_blank&quot;&gt;https://dev.mysql.com/doc/connector-odbc/en/connector-odbc-configuration-dsn-windows-5-2.html&lt;/a&gt;.&amp;nbsp;&lt;/li&gt;
&lt;li&gt;This Data Source Name (DSN) will be used during migration of MS Access tables to MySQL database. During creation of DSN, there is a &lt;b&gt;Connection Parameters Dialog box&lt;/b&gt;(as shown below)&lt;b&gt;&amp;nbsp;&lt;/b&gt;where &lt;b&gt;Database connection parameters&lt;/b&gt; like Database Host, Database User, Database Password and Database Name need to be filled. During migration, this database connection will be used.&lt;br /&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgyvCPMVMiRHS42nO-lbotL6YjYkV4Svb2Fe-vEyRcPcZCyym1gxkw2hzsRb3r2U9JyqoaXzDfkX6xMoY1W0Pux24235XyFOuVkQTUL7EJYk3dTNHNSUtaa9JyGvZFG0nC74ZsfO8M4L50/s1600/mysqlodbcadddsn.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em; text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;470&quot; data-original-width=&quot;406&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgyvCPMVMiRHS42nO-lbotL6YjYkV4Svb2Fe-vEyRcPcZCyym1gxkw2hzsRb3r2U9JyqoaXzDfkX6xMoY1W0Pux24235XyFOuVkQTUL7EJYk3dTNHNSUtaa9JyGvZFG0nC74ZsfO8M4L50/s320/mysqlodbcadddsn.png&quot; width=&quot;276&quot; /&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;The documentation for exporting MS Access database to MySQL database can be found at &lt;a href=&quot;https://dev.mysql.com/doc/connector-odbc/en/connector-odbc-examples-tools-with-access-export.html&quot; target=&quot;_blank&quot;&gt;https://dev.mysql.com/doc/connector-odbc/en/connector-odbc-examples-tools-with-access-export.html&lt;/a&gt;.&amp;nbsp;&lt;/li&gt;
&lt;/ol&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;b&gt;Brief Overview of Export Process:&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;Create a new database in MySQL. Its connection details are filled in Connection Parameters  Dialog box during creation of DSN (as described above) as tables in MS Access will be exported in this database.&lt;/li&gt;
&lt;li&gt;Open MS Access .mdb file to be exported. In the left panel, there are table names and when a table name is clicked, the table data is shown in the right panel. Right click on the table you want to export, and in the menu (as shown below) that appears, choose &lt;b&gt;Export -&amp;gt;ODBC Database&lt;/b&gt;.&lt;br /&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgbql7FNbhE1S5OYMtn8lnESp6MEW7oH78ZImGVYx5yhOLyJ_NZM03ivbHfETbwWFRbUtY32K-W25Vw-acbuTVC_OH-8R7c58Tf91hyphenhyphenBGGwvYpuNezB26wBUb0zzFgwfdE-FIYwJ7aKf7Q/s1600/accessdatabase.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em; text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;670&quot; data-original-width=&quot;650&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgbql7FNbhE1S5OYMtn8lnESp6MEW7oH78ZImGVYx5yhOLyJ_NZM03ivbHfETbwWFRbUtY32K-W25Vw-acbuTVC_OH-8R7c58Tf91hyphenhyphenBGGwvYpuNezB26wBUb0zzFgwfdE-FIYwJ7aKf7Q/s320/accessdatabase.png&quot; width=&quot;310&quot; /&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;The &lt;b&gt;Export dialog box&lt;/b&gt; appears (as shown below). Enter the desired name for the table after its import into the MySQL server, and click OK.&lt;br /&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjl8UuZorhaypN4O0dgHhUakMaqoxVJ2zAblxq1vwY8NOjGi-tw7_I7wYx7bgF3TOImSmqSzUUxVDXLY-ZFVR0DnsFfoREYiGcmZV6nsKSqD6A3C7a1Hepr1aqJGZoW0iq9NMrYga-pj4E/s1600/accessodbc.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em; text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;168&quot; data-original-width=&quot;400&quot; height=&quot;133&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjl8UuZorhaypN4O0dgHhUakMaqoxVJ2zAblxq1vwY8NOjGi-tw7_I7wYx7bgF3TOImSmqSzUUxVDXLY-ZFVR0DnsFfoREYiGcmZV6nsKSqD6A3C7a1Hepr1aqJGZoW0iq9NMrYga-pj4E/s320/accessodbc.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;The &lt;b&gt;Select Data Source dialog box&lt;/b&gt;&amp;nbsp;(as shown below)&amp;nbsp;appears. It lists the defined data sources for any ODBC drivers installed on your computer. Click either the File Data Source or Machine Data Source tab, and then double-click the &lt;b&gt;Connector/ODBC DSN&lt;/b&gt; to which you want to export your table (DSN created above).&lt;br /&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj_f8xhnMuKdnCiNEXZpvw_5EuEm0hUpQuRq2-qlUFpdzNUlEClWjodB3npugdZ7_NxvzgYckPH-mArmnmfe5ZH6DEV7XEkLcSQlY8J87lY23nr1hVX7wmr3IPKR48yJub9bQZ9mAlyRpQ/s1600/mysqlodbcselect.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em; text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;489&quot; data-original-width=&quot;612&quot; height=&quot;255&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj_f8xhnMuKdnCiNEXZpvw_5EuEm0hUpQuRq2-qlUFpdzNUlEClWjodB3npugdZ7_NxvzgYckPH-mArmnmfe5ZH6DEV7XEkLcSQlY8J87lY23nr1hVX7wmr3IPKR48yJub9bQZ9mAlyRpQ/s320/mysqlodbcselect.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;A dialog box appears with a &lt;b&gt;success message&lt;/b&gt; if the &lt;b&gt;export is successful&lt;/b&gt;. In the dialog box, you can choose to save the export steps for easy repetitions in the future.&lt;br /&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjFl08UzxJya8xJsygLrYAhXe4Op6j1mKGEvpBIkVkHTnBiaxCErUA86edzhW0c4sBJlseP0vZlMCTEo6KPasxFqWl6SUJwUsM4Qj56PslzMSrwXrZdTj_hrrUD8S57MG8O-4SvsKxXJJs/s1600/accessodbcsuccess.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em; text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;232&quot; data-original-width=&quot;756&quot; height=&quot;98&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjFl08UzxJya8xJsygLrYAhXe4Op6j1mKGEvpBIkVkHTnBiaxCErUA86edzhW0c4sBJlseP0vZlMCTEo6KPasxFqWl6SUJwUsM4Qj56PslzMSrwXrZdTj_hrrUD8S57MG8O-4SvsKxXJJs/s320/accessodbcsuccess.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;If you see the &lt;b&gt;error message&lt;/b&gt;&amp;nbsp;(as shown below)&amp;nbsp;instead when you try to export to the Connector/ODBC DSN, it means you did not choose the Database to connect to when you defined in to the DSN. Reconfigure the DSN and specify the Database.&lt;br /&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgMgplAm_Nssg9uGSuuQOL9ykuGlmYKmU3cipxOMQcD9pgZ34yN6pqTxA7fowTZV2J2GfgHeeHQTaOZg0IRGeSzaEUN-gz0ymxWTDTpSF0bzda8GF4f0ZAGKNR6Uu1-CHnZg_tZVXYUL9Q/s1600/accessodbcfailure.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em; text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;130&quot; data-original-width=&quot;455&quot; height=&quot;91&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgMgplAm_Nssg9uGSuuQOL9ykuGlmYKmU3cipxOMQcD9pgZ34yN6pqTxA7fowTZV2J2GfgHeeHQTaOZg0IRGeSzaEUN-gz0ymxWTDTpSF0bzda8GF4f0ZAGKNR6Uu1-CHnZg_tZVXYUL9Q/s320/accessodbcfailure.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
After the tables from MS Access are exported to MySQL database, you can &lt;b&gt;export the MySQL database dump as .sql file&lt;/b&gt; which can be &lt;b&gt;imported to other Web based DBMS&lt;/b&gt; which you are using.&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;b&gt;References:&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;/div&gt;
&lt;ol style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;&lt;a href=&quot;https://dev.mysql.com/doc/connector-odbc/en/connector-odbc-introduction.html&quot; target=&quot;_blank&quot;&gt;https://dev.mysql.com/doc/connector-odbc/en/connector-odbc-introduction.html&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://dev.mysql.com/downloads/connector/odbc/5.3.html&quot; target=&quot;_blank&quot;&gt;https://dev.mysql.com/downloads/connector/odbc/5.3.html&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://dev.mysql.com/doc/connector-odbc/en/connector-odbc-configuration-dsn-windows-5-2.html&quot; target=&quot;_blank&quot;&gt;https://dev.mysql.com/doc/connector-odbc/en/connector-odbc-configuration-dsn-windows-5-2.html&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://dev.mysql.com/doc/connector-odbc/en/connector-odbc-examples-tools-with-access-export.html&quot; target=&quot;_blank&quot;&gt;https://dev.mysql.com/doc/connector-odbc/en/connector-odbc-examples-tools-with-access-export.html&lt;/a&gt;.&lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://thecodingplatform.blogspot.com/feeds/7473007723373089253/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://thecodingplatform.blogspot.com/2017/10/migrate-ms-access-database-mdb-to-mysql.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6961899971002546823/posts/default/7473007723373089253'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6961899971002546823/posts/default/7473007723373089253'/><link rel='alternate' type='text/html' href='http://thecodingplatform.blogspot.com/2017/10/migrate-ms-access-database-mdb-to-mysql.html' title='Migrate MS Access database (.mdb) to MySQL  (.sql) database using MySQL ODBC Connector'/><author><name>testing</name><uri>http://www.blogger.com/profile/03705416234539295633</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgyvCPMVMiRHS42nO-lbotL6YjYkV4Svb2Fe-vEyRcPcZCyym1gxkw2hzsRb3r2U9JyqoaXzDfkX6xMoY1W0Pux24235XyFOuVkQTUL7EJYk3dTNHNSUtaa9JyGvZFG0nC74ZsfO8M4L50/s72-c/mysqlodbcadddsn.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6961899971002546823.post-356102545863272430</id><published>2016-06-29T18:45:00.000+05:30</published><updated>2017-08-24T03:35:48.867+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="array in PHP"/><category scheme="http://www.blogger.com/atom/ns#" term="associative"/><category scheme="http://www.blogger.com/atom/ns#" term="multidimensional"/><category scheme="http://www.blogger.com/atom/ns#" term="sorting"/><category scheme="http://www.blogger.com/atom/ns#" term="Sorting a multidimensional associative array in PHP"/><category scheme="http://www.blogger.com/atom/ns#" term="sorting an array of arrays by the keys of sub-arrays"/><title type='text'>Sorting a multidimensional associative array by key&#39;s value using usort in PHP</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
This post explains how a multidimensional associative array in PHP can be sorted by value of one of the &lt;span style=&quot;color: red;&quot;&gt;associative keys&lt;/span&gt;. It can also be described as &lt;b&gt;sorting an array of arrays by the keys of sub-arrays&lt;/b&gt;.&lt;span style=&quot;font-family: &amp;quot;fira mono&amp;quot; , &amp;quot;source code pro&amp;quot; , monospace;&quot;&gt;&lt;span style=&quot;background-color: white; font-size: 14px; line-height: 24px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;Let us understand the situation with an example. Suppose there is a PHP array shown in the PHP code below:&lt;br /&gt;
&lt;pre class=&quot;brush: php&quot;&gt;
&amp;lt;?php
$multi_array = array(array(&#39;name&#39; =&amp;gt; &#39;Orange&#39;, &#39;code&#39; =&amp;gt; &#39;18plkp&#39;, &#39;value&#39; =&amp;gt; 15),
                     array(&#39;name&#39; =&amp;gt; &#39;Apple&#39;, &#39;code&#39; =&amp;gt; &#39;45jklp&#39;, &#39;value&#39; =&amp;gt; 49),
                     array(&#39;name&#39; =&amp;gt; &#39;Guava&#39;, &#39;code&#39; =&amp;gt; &#39;48pyhp&#39;, &#39;value&#39; =&amp;gt; 169)
                    );
var_dump($multi_array);
?&amp;gt;
&lt;/pre&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
The output of this code is as follows:&lt;br /&gt;
&lt;pre class=&quot;xdebug-var-dump&quot; dir=&quot;ltr&quot;&gt;&lt;b&gt;array&lt;/b&gt; &lt;i&gt;(size=3)&lt;/i&gt;
  0 &lt;span style=&quot;color: #888a85;&quot;&gt;=&amp;gt;&lt;/span&gt; 
    &lt;b&gt;array&lt;/b&gt; &lt;i&gt;(size=3)&lt;/i&gt;
      &#39;name&#39; &lt;span style=&quot;color: #888a85;&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;small&gt;string&lt;/small&gt; &lt;span style=&quot;color: #cc0000;&quot;&gt;&#39;Orange&#39;&lt;/span&gt; &lt;i&gt;(length=6)&lt;/i&gt;
      &#39;code&#39; &lt;span style=&quot;color: #888a85;&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;small&gt;string&lt;/small&gt; &lt;span style=&quot;color: #cc0000;&quot;&gt;&#39;18plkp&#39;&lt;/span&gt; &lt;i&gt;(length=6)&lt;/i&gt;
      &#39;value&#39; &lt;span style=&quot;color: #888a85;&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;small&gt;int&lt;/small&gt; &lt;span style=&quot;color: #4e9a06;&quot;&gt;15&lt;/span&gt;
  1 &lt;span style=&quot;color: #888a85;&quot;&gt;=&amp;gt;&lt;/span&gt; 
    &lt;b&gt;array&lt;/b&gt; &lt;i&gt;(size=3)&lt;/i&gt;
      &#39;name&#39; &lt;span style=&quot;color: #888a85;&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;small&gt;string&lt;/small&gt; &lt;span style=&quot;color: #cc0000;&quot;&gt;&#39;Apple&#39;&lt;/span&gt; &lt;i&gt;(length=5)&lt;/i&gt;
      &#39;code&#39; &lt;span style=&quot;color: #888a85;&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;small&gt;string&lt;/small&gt; &lt;span style=&quot;color: #cc0000;&quot;&gt;&#39;45jklp&#39;&lt;/span&gt; &lt;i&gt;(length=6)&lt;/i&gt;
      &#39;value&#39; &lt;span style=&quot;color: #888a85;&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;small&gt;int&lt;/small&gt; &lt;span style=&quot;color: #4e9a06;&quot;&gt;49&lt;/span&gt;
  2 &lt;span style=&quot;color: #888a85;&quot;&gt;=&amp;gt;&lt;/span&gt; 
    &lt;b&gt;array&lt;/b&gt; &lt;i&gt;(size=3)&lt;/i&gt;
      &#39;name&#39; &lt;span style=&quot;color: #888a85;&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;small&gt;string&lt;/small&gt; &lt;span style=&quot;color: #cc0000;&quot;&gt;&#39;Guava&#39;&lt;/span&gt; &lt;i&gt;(length=5)&lt;/i&gt;
      &#39;code&#39; &lt;span style=&quot;color: #888a85;&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;small&gt;string&lt;/small&gt; &lt;span style=&quot;color: #cc0000;&quot;&gt;&#39;48pyhp&#39;&lt;/span&gt; &lt;i&gt;(length=6)&lt;/i&gt;
      &#39;value&#39; &lt;span style=&quot;color: #888a85;&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;small&gt;int&lt;/small&gt; &lt;span style=&quot;color: #4e9a06;&quot;&gt;169&lt;/span&gt;&lt;/pre&gt;
This is an array which has 3 elements. These 3 elements are associative arrays. So, if you want &lt;b&gt;to sort the array $multi_array with the value of associative key &#39;name&#39;&lt;/b&gt;, then how will you do it in PHP?&lt;br /&gt;
Read below for the solution.&lt;br /&gt;
So, after sorting the array by key &#39;name&#39; in ascending order, the array will look like as follows:&lt;br /&gt;
&lt;pre class=&quot;xdebug-var-dump&quot; dir=&quot;ltr&quot;&gt;&lt;b&gt;array&lt;/b&gt; &lt;i&gt;(size=3)&lt;/i&gt;
  0 &lt;span style=&quot;color: #888a85;&quot;&gt;=&amp;gt;&lt;/span&gt; 
    &lt;b&gt;array&lt;/b&gt; &lt;i&gt;(size=3)&lt;/i&gt;
      &#39;name&#39; &lt;span style=&quot;color: #888a85;&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;small&gt;string&lt;/small&gt; &lt;span style=&quot;color: #cc0000;&quot;&gt;&#39;Apple&#39;&lt;/span&gt; &lt;i&gt;(length=5)&lt;/i&gt;
      &#39;code&#39; &lt;span style=&quot;color: #888a85;&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;small&gt;string&lt;/small&gt; &lt;span style=&quot;color: #cc0000;&quot;&gt;&#39;45jklp&#39;&lt;/span&gt; &lt;i&gt;(length=6)&lt;/i&gt;
      &#39;value&#39; &lt;span style=&quot;color: #888a85;&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;small&gt;int&lt;/small&gt; &lt;span style=&quot;color: #4e9a06;&quot;&gt;49&lt;/span&gt;
  1 &lt;span style=&quot;color: #888a85;&quot;&gt;=&amp;gt;&lt;/span&gt; 
    &lt;b&gt;array&lt;/b&gt; &lt;i&gt;(size=3)&lt;/i&gt;
      &#39;name&#39; &lt;span style=&quot;color: #888a85;&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;small&gt;string&lt;/small&gt; &lt;span style=&quot;color: #cc0000;&quot;&gt;&#39;Guava&#39;&lt;/span&gt; &lt;i&gt;(length=5)&lt;/i&gt;
      &#39;code&#39; &lt;span style=&quot;color: #888a85;&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;small&gt;string&lt;/small&gt; &lt;span style=&quot;color: #cc0000;&quot;&gt;&#39;48pyhp&#39;&lt;/span&gt; &lt;i&gt;(length=6)&lt;/i&gt;
      &#39;value&#39; &lt;span style=&quot;color: #888a85;&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;small&gt;int&lt;/small&gt; &lt;span style=&quot;color: #4e9a06;&quot;&gt;169&lt;/span&gt;
  2 &lt;span style=&quot;color: #888a85;&quot;&gt;=&amp;gt;&lt;/span&gt; 
    &lt;b&gt;array&lt;/b&gt; &lt;i&gt;(size=3)&lt;/i&gt;
      &#39;name&#39; &lt;span style=&quot;color: #888a85;&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;small&gt;string&lt;/small&gt; &lt;span style=&quot;color: #cc0000;&quot;&gt;&#39;Orange&#39;&lt;/span&gt; &lt;i&gt;(length=6)&lt;/i&gt;
      &#39;code&#39; &lt;span style=&quot;color: #888a85;&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;small&gt;string&lt;/small&gt; &lt;span style=&quot;color: #cc0000;&quot;&gt;&#39;18plkp&#39;&lt;/span&gt; &lt;i&gt;(length=6)&lt;/i&gt;
      &#39;value&#39; &lt;span style=&quot;color: #888a85;&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;small&gt;int&lt;/small&gt; &lt;span style=&quot;color: #4e9a06;&quot;&gt;15&lt;/span&gt;&lt;/pre&gt;
For achieving the above output after sorting, we will &lt;b&gt;use a PHP function &quot;usort&quot;&lt;/b&gt; as follows:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: php&quot;&gt;
usort($multi_array, function($a, $b){
    return strnatcmp($a[&#39;name&#39;], $b[&#39;name&#39;]);
});
&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
So, here is the full code and its explanation.&lt;br /&gt;
&lt;br /&gt;
Code:&lt;br /&gt;
&lt;pre class=&quot;brush: php&quot;&gt;
&amp;lt;?php
$multi_array = array(array(&#39;name&#39; =&amp;gt; &#39;Orange&#39;, &#39;code&#39; =&amp;gt; &#39;18plkp&#39;, &#39;value&#39; =&amp;gt; 15),
                     array(&#39;name&#39; =&amp;gt; &#39;Apple&#39;, &#39;code&#39; =&amp;gt; &#39;45jklp&#39;, &#39;value&#39; =&amp;gt; 49),
                     array(&#39;name&#39; =&amp;gt; &#39;Guava&#39;, &#39;code&#39; =&amp;gt; &#39;48pyhp&#39;, &#39;value&#39; =&amp;gt; 169)
                    );
var_dump($multi_array);
usort($multi_array, function($a, $b){
    return strnatcmp($a[&#39;name&#39;], $b[&#39;name&#39;]);
});
var_dump($multi_array);
?&amp;gt;
&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
Explanation:&lt;br /&gt;
1. $multi_array is a multidimensional array which has &lt;b&gt;3 associative arrays as its elements&lt;/b&gt;.&lt;br /&gt;
2. The first var_dump($multi_array) dumps the array on the console.&lt;br /&gt;
3. Here is the main part where sorting is done. The &lt;b&gt;usort function&lt;/b&gt; has the following documentation:&lt;br /&gt;
&lt;span class=&quot;refname&quot; style=&quot;background-color: #f2f2f2; color: #333333; font-family: &amp;quot;fira sans&amp;quot; , &amp;quot;source sans pro&amp;quot; , &amp;quot;helvetica&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif; font-size: 16px; line-height: 24px;&quot;&gt;usort&lt;/span&gt;&lt;span style=&quot;background-color: #f2f2f2; color: #333333; font-family: &amp;quot;fira sans&amp;quot; , &amp;quot;source sans pro&amp;quot; , &amp;quot;helvetica&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif; font-size: 16px; line-height: 24px;&quot;&gt;&amp;nbsp;—&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;dc-title&quot; style=&quot;background-color: #f2f2f2; color: #333333; font-family: &amp;quot;fira sans&amp;quot; , &amp;quot;source sans pro&amp;quot; , &amp;quot;helvetica&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif; font-size: 16px; line-height: 24px;&quot;&gt;Sort an array by values using a user-defined comparison function&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; The &lt;span style=&quot;color: red;&quot;&gt;first argument &lt;/span&gt;is the &lt;b&gt;array variable that is to be sorted&lt;/b&gt;. The &lt;span style=&quot;color: red;&quot;&gt;second argument&lt;/span&gt; is the &lt;b&gt;user-supplied comparison function&lt;/b&gt;. In the comparison function, we have &lt;b&gt;used &quot;strnatcmp&quot; to compare&lt;/b&gt; the array elements by key &quot;name&quot;. If the sorting needs to be done on another key, then that key can be used instead of &quot;name&quot;. The strnatcmp compares alphanumeric strings.&lt;br /&gt;
4. The second var_dump($multi_array) outputs the sorted array to the console.&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;Note:&lt;/span&gt; The second argument passed to usort in the above example is an anonymous function which was introduced in PHP 5.3. So, for PHP &amp;lt; 5.3, we have to define a callback function and then pass the function name as the second argument to usort as shown below:&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: php&quot;&gt;
&amp;lt;?php
function cmp($a, $b)&lt;br /&gt;
{
    return strnatcmp($a[&#39;name&#39;], $b[&#39;name&#39;]);
}&lt;br /&gt;
$multi_array = array(array(&#39;name&#39; =&amp;gt; &#39;Orange&#39;, &#39;code&#39; =&amp;gt; &#39;18plkp&#39;, &#39;value&#39; =&amp;gt; 15),
                     array(&#39;name&#39; =&amp;gt; &#39;Apple&#39;, &#39;code&#39; =&amp;gt; &#39;45jklp&#39;, &#39;value&#39; =&amp;gt; 49),
                     array(&#39;name&#39; =&amp;gt; &#39;Guava&#39;, &#39;code&#39; =&amp;gt; &#39;48pyhp&#39;, &#39;value&#39; =&amp;gt; 169)
                    );
var_dump($multi_array);
usort($multi_array, &quot;cmp&quot;);
var_dump($multi_array);
?&amp;gt;
&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
Hope, you will get some useful information from this post.&lt;br /&gt;
Thanks.&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://thecodingplatform.blogspot.com/feeds/356102545863272430/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://thecodingplatform.blogspot.com/2016/06/sorting-multidimensional-associative.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6961899971002546823/posts/default/356102545863272430'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6961899971002546823/posts/default/356102545863272430'/><link rel='alternate' type='text/html' href='http://thecodingplatform.blogspot.com/2016/06/sorting-multidimensional-associative.html' title='Sorting a multidimensional associative array by key&#39;s value using usort in PHP'/><author><name>testing</name><uri>http://www.blogger.com/profile/03705416234539295633</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6961899971002546823.post-8229305164226138360</id><published>2013-10-31T03:46:00.003+05:30</published><updated>2017-10-21T16:02:27.538+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="google map"/><title type='text'>How to make a Google Map using javascript?</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Today, it is common to use google maps to locate the places. There are mobile applications used in mobiles. On websites, the places are located on google maps. Those google maps are made using Google Maps API provided by Google. Here, we will see how to make a simple google map for a particular location using HTML, javascript and Google Maps API.&lt;br /&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;Here, the HTML code goes below.&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: xml&quot; name=&quot;code&quot;&gt;&amp;lt;html&amp;gt;
&amp;lt;head&amp;gt;
&amp;lt;script type=&quot;text/javascript&quot; src=&quot;http://maps.googleapis.com/maps/api/js?sensor=false&quot;&amp;gt;&amp;lt;/script&amp;gt;
&amp;lt;script type = &quot;text/javascript&quot;&amp;gt;
var infoWindow = new google.maps.InfoWindow;
function load() {
      var map = new google.maps.Map(document.getElementById(&quot;googlemap&quot;), {
        center: new google.maps.LatLng(37.40557, -122.07747),
        zoom: 13,
        mapTypeId: &quot;roadmap&quot;
      });
   
   var point = new google.maps.LatLng(37.40557, -122.07747);
          var html = &quot;&amp;lt;b&amp;gt;Google Inc.&amp;lt;/b&amp;gt; &amp;lt;br/&amp;gt;Mountain View, CA 94043&quot;;
          var marker = new google.maps.Marker({
            map: map,
            position: point
          });
          bindInfoWindow(marker, map, infoWindow, html);
}
function bindInfoWindow(marker, map, infoWindow, html) {
      google.maps.event.addListener(marker, &quot;click&quot;, function() {
        infoWindow.setContent(html);
        infoWindow.open(map, marker);
      });
    }
&amp;lt;/script&amp;gt;
&amp;lt;/head&amp;gt;
&amp;lt;body onload=&quot;load()&quot;&amp;gt;
&amp;lt;div align=&quot;center&quot;&amp;gt;
&amp;lt;table border=&quot;1&quot; width=&quot;80%&quot; height=&quot;80%&quot;&amp;gt;
&amp;lt;tr&amp;gt;
&amp;lt;td id=&quot;googlemap&quot; width=&quot;80%&quot; height=&quot;80%&quot;&amp;gt;&amp;lt;/td&amp;gt;
&amp;lt;/tr&amp;gt;
&amp;lt;/table&amp;gt;
&amp;lt;/div&amp;gt;
&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;
&lt;/pre&gt;
&lt;br /&gt;
&lt;b&gt;Important Points:&lt;/b&gt;&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;Here, the location shown is the Google Inc. with postal code as 94043 and latitude and longitude as 37.40557 and -122.07747 respectively.&lt;/li&gt;
&lt;li&gt;You may customize the map using the tutorials on the developers Google Maps API at&amp;nbsp;&lt;a href=&quot;https://developers.google.com/maps/&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #990000;&quot;&gt;https://developers.google.com/maps&lt;/span&gt;&lt;/b&gt;&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://thecodingplatform.blogspot.com/feeds/8229305164226138360/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://thecodingplatform.blogspot.com/2013/10/how-to-make-google-map.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6961899971002546823/posts/default/8229305164226138360'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6961899971002546823/posts/default/8229305164226138360'/><link rel='alternate' type='text/html' href='http://thecodingplatform.blogspot.com/2013/10/how-to-make-google-map.html' title='How to make a Google Map using javascript?'/><author><name>testing</name><uri>http://www.blogger.com/profile/03705416234539295633</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6961899971002546823.post-8528767845477265569</id><published>2013-09-15T21:01:00.001+05:30</published><updated>2017-10-21T16:03:37.807+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="data extraction"/><category scheme="http://www.blogger.com/atom/ns#" term="facebook"/><category scheme="http://www.blogger.com/atom/ns#" term="php"/><category scheme="http://www.blogger.com/atom/ns#" term="URL extraction"/><title type='text'>URL data extraction like facebook - Simple script in PHP</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
When you enter a url, then the main data like title, logo, etc. of the page to which the url takes you, are shown. This is called URL extraction. The best example you can see is facebook. Go to facebook homepage, enter the url in its status box. As soon as you type the url ,it shows you the extracted contents of the page corresponding to the url typed.&lt;br /&gt;
&lt;div&gt;
Let&#39;s write a simple script in PHP to show URL extraction. Mainly it will be css, javascript and html. We will use only file_get_contents(url) function of PHP.&lt;/div&gt;
&lt;div&gt;
Here the code goes...............&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Put this code in a text file and save as .html.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;pre class=&quot;brush: xml&quot; name=&quot;code&quot;&gt;&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;iso-8859-1&quot;?&amp;gt;
&amp;lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&amp;gt;
&amp;lt;html&amp;gt;
&amp;lt;head&amp;gt;
&amp;lt;meta http-equiv=&quot;content-type&quot; content=&quot;text/html; charset=iso-8859-1&quot; /&amp;gt;
&amp;lt;title&amp;gt;URL Extraction like facebook&amp;lt;/title&amp;gt;
&amp;lt;script type=&quot;text/javascript&quot; src=&quot;http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js&quot;&amp;gt;&amp;lt;/script&amp;gt;
&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;
$(document).ready(function()
{
 $(&quot;#linkbox&quot;).keyup(function()
 {
 var content=$(this).val();
 var regex = /(\b(https?|ftp|file):\/\/[-A-Z0-9+&amp;amp;@#\/%?=~_|!:,.;]*[-A-Z0-9+&amp;amp;@#\/%=~_|])/ig;
 var link= content.match(regex);
 if(link!=null &amp;amp;&amp;amp; link.length&amp;gt;0)
 {
  $(&quot;#databox&quot;).slideDown(&#39;show&#39;);
  $(&quot;#databox&quot;).html(&quot;&amp;lt;img src=&#39;link_image.gif&#39;&amp;gt;&quot;);
  $.get(&quot;getdata.php?link=&quot;+link,function(data)
  {
   if(data != null &amp;amp; data.length &amp;gt; 0)
   {
    var title=(/&amp;lt;title&amp;gt;(.*?)&amp;lt;\/title&amp;gt;/m).exec(data)[1];
    var logo=(/src=&#39;(.*?)&#39;/m).exec(data)[1];
    if(logo &amp;amp;&amp;amp; title)
    $(&quot;#databox&quot;).html(&quot;&amp;lt;img src=&#39;&quot;+logo+&quot;&#39; class=&#39;img&#39;/&amp;gt;&amp;lt;div&amp;gt;&amp;lt;b&amp;gt;&quot;+title+&quot;&amp;lt;/b&amp;gt;&amp;lt;br/&amp;gt;&quot;+link);
   }
  });
 }
 return false;
 });
});
&amp;lt;/script&amp;gt;
&amp;lt;style&amp;gt;
#linkbox
{
width:500px; height:100px;
border:solid 2px #bbbbbb;
font-size:14px;
margin-bottom:6px;
}
.img
{
float:left; width:150px; max-height: 100px; margin-right:10px;
text-align:center;
}
#databox
{
border:solid 2px #bbbbbb; width: 500px; min-height:100px; padding:15px;
display:none;
}
&amp;lt;/style&amp;gt;
&amp;lt;/head&amp;gt;
&amp;lt;body&amp;gt;
&amp;lt;div style=&quot;margin:50px; padding:10px; width:460px&quot;&amp;gt;
&amp;lt;div style=&quot;height:25px&quot;&amp;gt;
&amp;lt;div style=&quot;float:left&quot;&amp;gt;&amp;lt;b&amp;gt;Enter url&amp;lt;/b&amp;gt;&amp;lt;br /&amp;gt;e.g., http://thecodinglessons.blogspot.com&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;textarea id=&quot;linkbox&quot;&amp;gt;&amp;lt;/textarea&amp;gt;&amp;lt;div id=&quot;databox&quot;&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;
&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;
&lt;/pre&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;link_image.gif - take any image which shows loading picture and put its name in place of link_image.gif.&lt;/li&gt;
&lt;li&gt;getdata.php - it is the PHP file which extracts the site data. Its code goes here.......&lt;/li&gt;
&lt;/ul&gt;
&lt;pre class=&quot;brush: php&quot; name=&quot;code&quot;&gt;&amp;lt;?php
if($_GET[&#39;link&#39;])
{
 echo file_get_contents($_GET[&#39;link&#39;]);
}
?&amp;gt;
&lt;/pre&gt;
&lt;div&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;The title and logo extraction is done in javascript code.&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://thecodingplatform.blogspot.com/feeds/8528767845477265569/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://thecodingplatform.blogspot.com/2013/09/url-data-extraction-like-facebook.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6961899971002546823/posts/default/8528767845477265569'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6961899971002546823/posts/default/8528767845477265569'/><link rel='alternate' type='text/html' href='http://thecodingplatform.blogspot.com/2013/09/url-data-extraction-like-facebook.html' title='URL data extraction like facebook - Simple script in PHP'/><author><name>testing</name><uri>http://www.blogger.com/profile/03705416234539295633</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6961899971002546823.post-1393566718965416531</id><published>2013-09-15T07:12:00.004+05:30</published><updated>2017-10-21T16:05:54.597+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Joomla"/><category scheme="http://www.blogger.com/atom/ns#" term="Joomla 3 installation issue on WAMP 2.4"/><category scheme="http://www.blogger.com/atom/ns#" term="WAMP"/><title type='text'>Joomla 3 installation issue on WAMP server version 2.4</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
A few days back, I installed WAMP 2.4 on Windows 8 (64 bit). Then I started installing Joomla 3 (latest version at that time) on this operating system. Now, the installation got stuck at the database creation. At first look, it looked like that there might be some incompatibility between Joomla 3 and Windows 8. But the actual problem was with WAMP 2.4 as I searched for the solutions.&lt;br /&gt;
&lt;h4 style=&quot;text-align: left;&quot;&gt;
In fact, the problem was with PHP version 5.4 which comes by default in WAMP 2.4.&lt;/h4&gt;
So, at first look, the solution might be like this:&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;&lt;b style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: #fdfdfd; color: #333333; font-size: 14px; line-height: 22.390625px;&quot;&gt;Download the &lt;/span&gt;&lt;a href=&quot;http://www.wampserver.com/en/&quot; style=&quot;background-color: #fdfdfd; box-sizing: border-box; font-size: 14px; line-height: 22.390625px; text-decoration: none;&quot; target=&quot;_blank&quot;&gt;&lt;span style=&quot;color: #0b5394;&quot;&gt;2.2 version of Wamp Server&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;background-color: #fdfdfd; color: #333333; font-size: 14px; line-height: 22.390625px;&quot;&gt;&amp;nbsp;32 bit or 64 bit depending upon your windows.&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&lt;b style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: #fdfdfd; color: #333333; font-size: 14px; line-height: 22.390625px;&quot;&gt;Install it. Then install Joomla 3 , if will become a piece of cake for you now.&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;span style=&quot;color: #333333; font-family: inherit; line-height: 22.390625px;&quot;&gt;If y&lt;/span&gt;&lt;span style=&quot;color: #333333; font-family: inherit; line-height: 22.390625px;&quot;&gt;ou don&#39;t wa&lt;/span&gt;&lt;span style=&quot;color: #333333; font-family: inherit; line-height: 22.390625px;&quot;&gt;nt to compromise on PHP version, then there is another solution available.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #333333; font-family: inherit; line-height: 22.390625px;&quot;&gt;Just try this out.&lt;/span&gt;&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;&lt;b style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: #fdfdfd; color: #333333; font-size: 14px; line-height: 22.390625px;&quot;&gt;Go to wamp\www\joomla folder\installation\sql\mysql and open joomla.sql file.&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&lt;b style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: #fdfdfd; color: #333333; font-size: 14px; line-height: 22.390625px;&quot;&gt;Find the term&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: #fdfdfd; color: #333333; font-size: 14px; line-height: 22.390625px;&quot;&gt;&quot;ENGINE=InnoDB&quot; and replace all with &quot;ENGINE=MyIsam&quot;.&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
The reason that this trick works is that&amp;nbsp;&lt;b style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: #fdfdfd; color: #333333; font-size: 14px; line-height: 22.390625px;&quot;&gt;MyIsam is more supported and compatible with Joomla.&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #333333; font-family: inherit;&quot;&gt;&lt;span style=&quot;line-height: 22.390625px;&quot;&gt;Hope you will like the post. Thanks for reading it.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://thecodingplatform.blogspot.com/feeds/1393566718965416531/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://thecodingplatform.blogspot.com/2013/09/joomlainstallationwampserver.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6961899971002546823/posts/default/1393566718965416531'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6961899971002546823/posts/default/1393566718965416531'/><link rel='alternate' type='text/html' href='http://thecodingplatform.blogspot.com/2013/09/joomlainstallationwampserver.html' title='Joomla 3 installation issue on WAMP server version 2.4'/><author><name>testing</name><uri>http://www.blogger.com/profile/03705416234539295633</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6961899971002546823.post-2537327794862519917</id><published>2013-09-10T03:10:00.002+05:30</published><updated>2017-10-21T16:07:46.989+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term=".htaccess"/><category scheme="http://www.blogger.com/atom/ns#" term="URL Rewriting"/><title type='text'>URL Rewriting A Brief Introduction</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;georgia&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;Hello everyone,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;georgia&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;these days you see many urls on different sites shown as some shortened random text. We may call them shortened urls which are made to function correctly by using URL Rewriting on the server on which the target website is hosted. This is just one example where URL rewriting is used. Many other usages are also there. Let&#39;s have a brief introduction of this technique below.&lt;/span&gt;&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;h4 style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;georgia&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;URL Rewriting A Brief Summary&lt;/span&gt;&lt;/h4&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;georgia&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: &amp;quot;georgia&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;First of all, you should know its definition.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;georgia&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;&lt;span style=&quot;background-color: white; font-size: 16px; line-height: 19.1875px;&quot;&gt;URL rewriting is the process of altering (often automatically by means of a program written for that purpose) the parameters in a&amp;nbsp;&lt;/span&gt;&lt;a href=&quot;http://searchnetworking.techtarget.com/definition/URL&quot; style=&quot;background-color: white; color: #663366; font-size: 16px; line-height: 19.1875px; outline: 0px;&quot;&gt;URL&lt;/a&gt;&lt;span style=&quot;background-color: white; font-size: 16px; line-height: 19.1875px;&quot;&gt;&amp;nbsp;(Uniform Resource Locator).&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #333333; font-size: 16px; line-height: 22.390625px;&quot;&gt;It allows you to completely separate the URL from the resource.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #333333; font-size: 16px; line-height: 22.390625px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;georgia&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;Suppose the website is at http://www.abc.com/a/b/index.html. You want to hide the path a/b/, i.e., you want the url to be http://www.abc.com/, then this can be achieved through this technique.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #333333; line-height: 1.3em;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;georgia&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;h3 style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;georgia&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;How to Rewrite URLs&lt;/span&gt;&lt;/h3&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: white; color: #333333; font-size: 16px; line-height: 22.390625px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;georgia&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;Implementing URL rewriting on a website depends on the Web server.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;&lt;span style=&quot;font-family: &amp;quot;georgia&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&lt;span style=&quot;line-height: 22.390625px;&quot;&gt;For example,&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #333333; font-size: 16px; line-height: 22.390625px;&quot;&gt;Apache usually comes with the URL rewriting module,&amp;nbsp;&lt;/span&gt;&lt;code style=&quot;background-color: #f5f2f0; border: 0px; color: #4e4e4e; font-size: 0.8em; line-height: 22.390625px; margin: 0px; outline: 0px; padding: 0.15625em 0.3125em; vertical-align: baseline; white-space: pre-line; word-wrap: break-word;&quot;&gt;mod_rewrite&lt;/code&gt;&lt;span style=&quot;background-color: white; color: #333333; font-size: 16px; line-height: 22.390625px;&quot;&gt;, already installed.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;background-color: white; color: #333333; font-size: 16px; line-height: 22.390625px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;georgia&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;Windows IIS requires installation of&amp;nbsp;&lt;a href=&quot;http://www.isapirewrite.com/&quot; rel=&quot;nofollow&quot; style=&quot;-webkit-tap-highlight-color: rgba(229, 59, 44, 0.4); border-bottom-color: rgba(0, 0, 0, 0.0980392); border-bottom-style: solid; border-bottom-width: 0.07em; color: #41b7d8; margin: 0px; padding: 0px 0px 0.07em; text-decoration: none; vertical-align: baseline;&quot; target=&quot;_blank&quot;&gt;ISAPI Rewrite&lt;/a&gt;&amp;nbsp;module.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;color: #333333; font-family: &amp;quot;georgia&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;&lt;span style=&quot;line-height: 22.390625px;&quot;&gt;Mostly it is done by editing .htaccess files on the server. There are some rewrite rules to make the things work. Well you can find the complete guide to rules to edit .htaccess and Rewrite Engine rules on the web. There are many sites available for this.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;georgia&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;&lt;span style=&quot;line-height: 22.390625px;&quot;&gt;Thanks for reading the post, hope you may have got some insight into URL Rewriting.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://thecodingplatform.blogspot.com/feeds/2537327794862519917/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://thecodingplatform.blogspot.com/2013/09/Urlrewriting.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6961899971002546823/posts/default/2537327794862519917'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6961899971002546823/posts/default/2537327794862519917'/><link rel='alternate' type='text/html' href='http://thecodingplatform.blogspot.com/2013/09/Urlrewriting.html' title='URL Rewriting A Brief Introduction'/><author><name>testing</name><uri>http://www.blogger.com/profile/03705416234539295633</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6961899971002546823.post-3045786663938965872</id><published>2013-09-08T15:51:00.000+05:30</published><updated>2017-10-21T16:09:59.455+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Internet Explorer 9"/><category scheme="http://www.blogger.com/atom/ns#" term="post method"/><category scheme="http://www.blogger.com/atom/ns#" term="textarea with tinyMCE controls"/><category scheme="http://www.blogger.com/atom/ns#" term="TinyMCE issue with IE9"/><title type='text'>TinyMCE issue with IE9</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;georgia&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;This is just a simple post about one of the problems I had while using tinyMCE editor in Internet Explorer.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;georgia&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;The issue was actually in the versions above IE8 only, i.e. IE9 and IE10. May be there some compatibility issues between tinyMCE editor and Internet Explorer.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;georgia&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;Suppose there is a form having a textarea with tinyMCE controls added to it and a submit button. The form uses post method. &lt;b&gt;When you submit this form with a value in the textarea, then that value is not posted to the action of the form(in IE9, IE10; for other browsers, it works fine).&lt;/b&gt; That means, the value of the textarea with tinyMCE controls is not transferred through HTTP POST method in versions above IE8.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;georgia&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;So, unless the issuse is fixed in tinyMCE editor or Internet Explorer, we can force the Internet Explorer to behave as its older version.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;georgia&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;The simplest thing is to just include this line in your html document(where you are using textarea with tinyMCE controls) after the starting of the head tag.&lt;/span&gt;&lt;br /&gt;
&lt;pre class=&quot;brush: xml&quot; name=&quot;code&quot;&gt;&amp;lt;head&amp;gt;
&amp;lt;meta http-equiv=&quot;X-UA-Compatible&quot; content=&quot;IE=EmulateIE7&quot; /&amp;gt;
&lt;/pre&gt;
&lt;span style=&quot;font-family: &amp;quot;georgia&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;georgia&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;That&#39;s it. Well, there are many solutions available for this issue but I think it is the simplest one.&lt;/span&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://thecodingplatform.blogspot.com/feeds/3045786663938965872/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://thecodingplatform.blogspot.com/2013/09/tinymce-problem-with-internet-explorer.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6961899971002546823/posts/default/3045786663938965872'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6961899971002546823/posts/default/3045786663938965872'/><link rel='alternate' type='text/html' href='http://thecodingplatform.blogspot.com/2013/09/tinymce-problem-with-internet-explorer.html' title='TinyMCE issue with IE9'/><author><name>testing</name><uri>http://www.blogger.com/profile/03705416234539295633</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6961899971002546823.post-3050847916632039262</id><published>2013-09-08T02:35:00.001+05:30</published><updated>2017-10-21T16:10:53.659+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="next and previous links"/><category scheme="http://www.blogger.com/atom/ns#" term="pagination script"/><category scheme="http://www.blogger.com/atom/ns#" term="Simple Pagination Script in PHP"/><title type='text'>Simple Pagination Script in PHP</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Let&#39;s do a bit of coding in PHP with mysql as the DBMS. Here, I will present the simplest of code to make a page which shows a fixed number of records on a page with the next and previous links to access the next or previous records.I think you are confused what I am saying.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Let&#39;s take an example.&lt;/b&gt;&lt;br /&gt;
Suppose there is a &lt;span style=&quot;background-color: #d9ead3;&quot;&gt;database named &quot;profile&quot;&lt;/span&gt;(Let&#39;s say in MYSQL). It has a &lt;span style=&quot;background-color: #d9ead3;&quot;&gt;table named &quot;tbl_comment&quot;&lt;/span&gt; which has &lt;span style=&quot;background-color: #d9ead3;&quot;&gt;two fields cid and ctext.&lt;/span&gt; Now there is a php file named &lt;span style=&quot;background-color: #d9ead3;&quot;&gt;comment.php&lt;/span&gt; which will show the list of comments from the tbl_comment table. As the number of comments in the table increase, we need a system to show them systematically on the screen &lt;span style=&quot;background-color: #eeeeee;&quot;&gt;so that the end-user has not to scroll much to read the comments.&lt;/span&gt; There comes the &lt;b&gt;pagination script&lt;/b&gt; handy. &lt;br /&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;In the code below, I will not present the page numbers. Only &lt;b&gt;next and previous links&lt;/b&gt; will be shown. Let&#39;s assume that only each only 5 comments be shown.&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;u&gt;&lt;i&gt;&lt;b&gt;Here is the PHP Pagination script for achieving this thing.&lt;/b&gt;&lt;/i&gt;&lt;/u&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: php&quot; name=&quot;code&quot;&gt;&amp;lt;?php
$dbc = mysql_connect(&quot;localhost&quot;, &quot;root&quot;, &quot;root&quot;) or die(mysql_error()); 
mysql_select_db(&quot;profile&quot;) or die(mysql_error());
$start = 0;
$limit = 6;
if(isset($_GET[&#39;start&#39;]))
{
 $start = @mysql_real_escape_string(trim($_GET[&#39;start&#39;]));
}
if(is_numeric($start) === false)
{
 $start = 0;
}
$query = &quot;select * from tbl_comment limit &quot;.$start.&quot;, &quot;.$limit;
$result = @mysql_query($query);
?&amp;gt;
&amp;lt;div style=&quot;width: 20%;&quot;&amp;gt;
&amp;lt;?php
if($start &amp;gt; ($limit - 2))
{
 echo &#39;&amp;lt;a href=&quot;comment.php?start=&#39;.($start - ($limit - 1)).&#39;&quot;&amp;gt;&amp;amp;lt;&amp;amp;lt;previous&amp;lt;/a&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&#39;;
}
if(@mysql_num_rows($result) &amp;gt; ($limit - 1))
{
 echo &#39;&amp;lt;a href=&quot;comment.php?start=&#39;.($start + ($limit - 1)).&#39;&quot; style=&quot;float: right;&quot;&amp;gt;next&amp;amp;gt;&amp;amp;gt;&amp;lt;/a&amp;gt;&#39;;
}
echo &quot;&amp;lt;/div&amp;gt;&quot;;         
$i = 0;
while($row = @mysql_fetch_array($result))
{
 if($i == 5)
 {
  break;
 }
 $i ++;
 echo &quot;&amp;lt;div&amp;gt;&quot;.$row[&#39;cid&#39;].&quot;) &quot;.$row[&#39;ctext&#39;].&quot;&amp;lt;/div&amp;gt;&quot;;           
}
?&amp;gt;
&lt;/pre&gt;
&lt;b&gt;Important Points:&lt;/b&gt;&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;&lt;span style=&quot;background-color: #f3f3f3; font-family: &amp;quot;times&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;This script takes the start GET parameter, selects the records from the database starting from the value of the start GET parameter to the limit of 6. Then it checks for the next and previous links show hide logic and shows 5 comments.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;background-color: #f3f3f3; font-family: &amp;quot;times&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;Substitute your parameters for the database connection in the first two lines.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;background-color: #f3f3f3; font-family: &amp;quot;times&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;You can change $limit variable to the limit you want.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;background-color: #f3f3f3; font-family: &amp;quot;times&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;Replace comment.php in the hrefs of &amp;lt;a&amp;gt; tags to the php file name in which you will place this code.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://thecodingplatform.blogspot.com/feeds/3050847916632039262/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://thecodingplatform.blogspot.com/2013/09/simple-pagination-script-in-php.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6961899971002546823/posts/default/3050847916632039262'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6961899971002546823/posts/default/3050847916632039262'/><link rel='alternate' type='text/html' href='http://thecodingplatform.blogspot.com/2013/09/simple-pagination-script-in-php.html' title='Simple Pagination Script in PHP'/><author><name>testing</name><uri>http://www.blogger.com/profile/03705416234539295633</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6961899971002546823.post-5339918212314720360</id><published>2013-09-05T03:27:00.001+05:30</published><updated>2017-10-21T16:12:55.842+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="anchor link"/><category scheme="http://www.blogger.com/atom/ns#" term="internet explorer"/><category scheme="http://www.blogger.com/atom/ns#" term="php header"/><category scheme="http://www.blogger.com/atom/ns#" term="PHP Redirection - Anchor link problem in INTERNET explorer"/><category scheme="http://www.blogger.com/atom/ns#" term="redirect"/><title type='text'>PHP Redirection - Anchor link problem in Internet explorer</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Well, this was one of the latest issue encountered by me while redirecting to a php page in a php file using php header() function in Internet Explorer.&lt;br /&gt;
&lt;b&gt;Problem Description:&lt;/b&gt;&lt;br /&gt;
&lt;span style=&quot;color: #660000;&quot;&gt;&lt;b&gt;header(&quot;Location: abc.php?a=b#area&quot;);&lt;/b&gt; &lt;/span&gt;where area is an anchor link in the html generated by php file abc.php like this&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;color: #990000;&quot;&gt;&amp;lt;a name=&quot;area&quot; id=&quot;area&quot;&amp;gt;&amp;lt;/a&amp;gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
The above header function should take to the page abc.php with the current view of the screen on &quot;area&quot; link.&lt;br /&gt;
It did so in all major browsers except in Internet Explorer.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
So, the solution for the problem was needed to make it browser compatible. After searching and trying different solutions, I adopted the following solution.&lt;br /&gt;
&lt;b&gt;Problem Solution:&lt;/b&gt;&lt;br /&gt;
Here, I will not use the # symbol in the redirection link as it is not a good practice as described in a document on wikepedia----&quot;&lt;span style=&quot;background-color: white; font-family: sans-serif; font-size: 13px; line-height: 19.1875px;&quot;&gt;Clients are not supposed to send URI-fragments to servers when they retrieve a document, and without help from a local application fragments do not participate in&amp;nbsp;&lt;/span&gt;&lt;a href=&quot;http://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol&quot; style=&quot;background-color: white; background-image: none; color: #0b0080; font-family: sans-serif; font-size: 13px; line-height: 19.1875px; text-decoration: none;&quot; title=&quot;Hypertext Transfer Protocol&quot;&gt;HTTP&lt;/a&gt;&lt;span style=&quot;background-color: white; font-family: sans-serif; font-size: 13px; line-height: 19.1875px;&quot;&gt;&amp;nbsp;redirections&quot;.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 19.1875px;&quot;&gt;The new header function is:&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #660000;&quot;&gt;header(&quot;Location: abc.php?a=b&amp;amp;link=area&quot;);&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
In abc.php, just check if $_GET[&#39;link&#39;] is set to area. If it is, then just use this javascript (&lt;i&gt;use jquery function to scroll it to the area link; don&#39;t forget to include jquery.min.js&lt;/i&gt;).&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;color: #660000;&quot;&gt;&amp;lt;?php&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;color: #660000;&quot;&gt;if(isset($_GET[&#39;link&#39;]) &amp;amp;&amp;amp; $_GET[&#39;link&#39;] == &quot;area&quot;)&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;color: #660000;&quot;&gt;{&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;color: #660000;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;echo &#39;&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;color: #660000;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;$(document).ready(function(){&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;color: #660000;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;$(document).scrollTop( $(&quot;#area&quot;).offset().top );&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;color: #660000;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }); &amp;lt;/script&amp;gt;&#39;;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;color: #660000;&quot;&gt;}&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;color: #660000;&quot;&gt;?&amp;gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Thanks for reading this post. Hope you may have got the solution if you have this type of problem.&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://thecodingplatform.blogspot.com/feeds/5339918212314720360/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://thecodingplatform.blogspot.com/2013/09/php-redirection-anchor-link-problem-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6961899971002546823/posts/default/5339918212314720360'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6961899971002546823/posts/default/5339918212314720360'/><link rel='alternate' type='text/html' href='http://thecodingplatform.blogspot.com/2013/09/php-redirection-anchor-link-problem-in.html' title='PHP Redirection - Anchor link problem in Internet explorer'/><author><name>testing</name><uri>http://www.blogger.com/profile/03705416234539295633</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6961899971002546823.post-9096758862750069656</id><published>2013-08-22T02:35:00.000+05:30</published><updated>2017-10-21T16:14:03.582+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="coding platform"/><category scheme="http://www.blogger.com/atom/ns#" term="INTRODUCTION TO CODING PLATFORM BLOG"/><category scheme="http://www.blogger.com/atom/ns#" term="programming"/><category scheme="http://www.blogger.com/atom/ns#" term="web development"/><title type='text'>INTRODUCTION TO CODING PLATFORM BLOG</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: #666666;&quot;&gt;Hello coders,&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Welcome to the coding platform blog.&lt;br /&gt;
Well, this blog will enhance your coding experience. For beginners, it will help develop expertise towards coding languages and think about better solutions to computing problems. It will help in taking expertise to next higher level for expert coders. Here, my experience with computer programming, some coding problems and their solutions, and the new emerging technologies in web development and application development will be shared. Hope everyone will enjoy while learning from this blog.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Thanks.&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://thecodingplatform.blogspot.com/feeds/9096758862750069656/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://thecodingplatform.blogspot.com/2013/08/introduction-to-coding-arena.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6961899971002546823/posts/default/9096758862750069656'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6961899971002546823/posts/default/9096758862750069656'/><link rel='alternate' type='text/html' href='http://thecodingplatform.blogspot.com/2013/08/introduction-to-coding-arena.html' title='INTRODUCTION TO CODING PLATFORM BLOG'/><author><name>testing</name><uri>http://www.blogger.com/profile/03705416234539295633</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>