2009

How to pass variable values in URL from page to page with PHP?

You can see dynamic URLs everywhere on the web with busy interactive sites. Variables and their values are passed from one page to another in this way. Or more precisely, a page served in PHP (a single file php script) can accept external input in the form of a dynamic URL such as http://www.asite.com/[email protected]&subject=hi&body=bye. In …

How to pass variable values in URL from page to page with PHP? Read More »

Using JavaScript to Open Excel and Word Files in HTML

One of the main reasons that you might need this is that Microsoft Excel and Word documents pervade. They are perfect media to store, display and distribute information and ideas. A rather straightforward approach is to simply link that document up. <a href=”bank/sheet.xls” >some excel file</a> Another approach is via JavaScript. <script type=”text/javascript”> function openExcel(strFilePath) …

Using JavaScript to Open Excel and Word Files in HTML Read More »

SQL: INSERT INTO … SELECT … to generate or combine records from existing ones and insert into an existing table

Update: Here is a more advanced use of INSERT INTO … SELECT … to combine multiple tables into one. While CREATE TABLE … SELECT … mix and mingle records by column from other tables into a table that’s created on the fly, INSERT INTO … SELECT … insert those generated or combined records into an …

SQL: INSERT INTO … SELECT … to generate or combine records from existing ones and insert into an existing table Read More »

SQL: CREATE TABLE … SELECT … to generate new table from existing tables

CREATE TABLE … SELECT comes rather useful when you need to generate reports from existing tables or do a mixture. The title just shows the basic usage of it, for instance, to create a new table xxx from 2 columns in yyy, namely col1, col2. After executing SQL: CREATE TABLE xxx SELECT col1, col2 FROM …

SQL: CREATE TABLE … SELECT … to generate new table from existing tables Read More »

How to build a php query string without question mark

As a result of the spreading SEO awareness and how Google works, it is always recommended to use as less dynamic URLs as possible for your site. If one must, try using as less variables in the dynamic URL as possible. A dynamic URL is one with a question mark that passes dynamic variables to …

How to build a php query string without question mark Read More »

Using JavaScript to refresh and reload an iframe on main page

<iframe></iframe> is useful in many aspects. There are times when you want to refresh the content of an iframe and reload the page in it, without refreshing that of the main page, and it can be achieved with a tiny property of iframe, src. Let’s say you have an iframe of captcha that enables the …

Using JavaScript to refresh and reload an iframe on main page Read More »

Check for file size with JavaScript before uploading

File uploading is a rather common feature of interactive sites. As all servers come with a limit on the size of the file being uploaded, it would be a usability blessing for users if web developers can implement a logic to check for the file size before uploading, informing the user if the size of …

Check for file size with JavaScript before uploading Read More »

Scroll to Top