How to make a web page fit the browser window

At these times your visitors have all kinds of different screen resolutions and also resize their browser window. Resolutions vary between 1280×1024, 1680×1050, 1920×1200, 2560×1440 and all make a huge difference. And then there’s the difference between people who have their browser window maximized, while others resize it so they can fit other windows on the screen as well. There’s a relatively easy way to make it fit the window properly.

Continue reading

Introduction to PHP Classes

Since PHP version 5 has been released, it has been improved with Object-Oriented Programming, using classes. It’s one of the most used features in system programming languages like C++ and can now be used in PHP.

In this article I assume you know the following in advance:

– You know what variables are and how to assign values to them in PHP.
– You know what a function is and how it works.

Before I start, I want to tell a bit about functions.

Continue reading

Combining PHP with JavaScript

Using server-side programming languages like PHP and ASP.NET is a great way to build dynamic web pages. Build content on-the-fly or perform database operations. This is usually combined with static HTML documents. But the major disadvantage of server-side scripts is the fact that each user input requires the page to be reloaded (basically needs to be re-parsed by the server-side application). And on the other hand there is JavaScript, which can perform many tasks without requiring a page to be reloaded, as all instructions can be processed directly in the browser.

There’ve been quite some questions about web developers who are wondering if they can combine a server-side programming language like PHP with a client-side programming language like JavaScript to combine the advantages of the two. Well, the answer is Yes. It can be done, and it’s not hard to do either. it just takes a different approach.

Continue reading

PHP Passing information — HTTP POST vs. HTTP GET vs. Sessions vs. Cookies

During the creation of PHP scripts you might encounter a situation where a value needs to be passed from one page to another. This will mostly be required when sending the visitor through a wizard or a login screen. This can be achieved by using:

  • HTTP GET
  • HTTP POST
  • Sessions
  • Cookies

I will briefly explain each of those.
Continue reading