Posted in Basic Programming | October 6th, 2008 | No Comments »

Image Source:farm1.static.flickr.com
When you type in, a URL in the address bar of your browser, like for example, http://www.fairgound.com and then you click Enter, what you’re actually doing is, you are sending a request to a particular web server that keeps the URL that you typed in and then it gets the contents from the specified location of that particular web page. What you are seeing in the browser is the HTML result of the actual code of the page you requested not the actual code most specially when the page uses server side scripting to show the output of the page. Parsing is the process of converting the actual code to HTML. Parser engines of the web servers are responsible for the conversion. Behind the HTML output that you are seeing in your browser is a maze of long, complex Php code. What happens is you request the URL, the web page is parsed, then server sends back the HTML generated before the server sends the HTML output to your browser.
Posted in Basics | September 29th, 2008 | No Comments »

Image Source:philrandolph.com
Trying to learn a new programming language like PHP can get a bit intimidating, especially if you have never had experience with other programming languages before. But the toughest part is really the starting point. Once you get past that, it is really just a matter of practicing. Being patient and learning the basics one at a time will help you get there. Here are some tips to help you learn simple PHP:
PHP is a language that uses scripting to supplement functions that HTML lacks. With PHP, you can collect and process data. Using this skill, you can create other functions to produce data that is more specialized.
- Get the tools. You will need a text editor.
- Get an FTP. FTP is used to exchange files from your computer to a remote server. We use to this to connect to a LAN or to an Internet site.
- Practice creating files using PHP.
Use online resources and tutorials for added reference.
Posted in Advanced Programming, Basic Programming, Basics, Debugging, Information, News, Sample Code, Template | August 11th, 2008 | No Comments »

Image source: www.basicphpprogramming.com
A programmer’s job requires him to keep his eyes focused on the glowing computer screen and keying in data by constantly pounding the keys of the keyboard. Programmers love what they do that it even makes them glued on their seats in front of their PCs which even they admit to be obsessive. But the consequence of their love affair with the computer is the painful overuse injuries that can keep them from doing their fist love—programming— and even simple tasks such as opening a mineral water bottle and turning the doorknob.
Repetitive Strain Injuries are acquired by the overuse of muscles and/or holding them in an unnatural position for a long time.
There are two common repetitive strain injury or RSIs are carpal tunnel syndrome and forearm tendonitis. If untreated, carpal tunnel syndrome can sometimes cause permanent nerve damage, and forearm tendonitis can harm muscles, tendons and ligaments that are essential for repetitive motion.
Standard keyboards require programmers to hold their hand in a fixed and unnatural position that can strain the forearms. Some computer tables may also be too high for them that when they key in data, their wrists are flexed which puts too much pressure on the median nerve. Constant pounding on the keys can cause tiny tears in the muscles and ligaments. In case no adjustments are made, this minor strain and discomfort can eventually lead into disabling injuries that can take months to heal. In some cases, even turning a doorknob produces extreme pain that is cause by hypersensinized nerves on the wrists.
Good news: RSIs are preventable and treatable. Regular breaks from typing, exercises concentrating on the hands, wrists and fingers, maintaining good posture in sitting and proper arm placement at the keyboard and a healthy workplace will go a long way towards preventing them.
Posted in Basic Programming, Sample Code | July 1st, 2008 | No Comments »
Arrays are what tables are to C-based programming languages and what databases are for SQL-based languages. Arrays or tables as they are sometimes called can be used to store the contents of several variables and to create one, you use the following syntax:
Array(key=>value)
The array in the syntax refers to the name of the array being created, the key is the index which is set automatically to a numeric character or string if none is specified. Value is the assigned value or content of the said array which can be seen easily in the following array creation example:
$b=array('z'=>‘Comedy”,’y'=>”Horror”,’x;’=>”Action”);
print_r($b);
?>
This piece of code would produce an output of :
Array ([0] => Comedy [1] => Horror [2] => Action)
More on array functions in the next posts.
Posted in Basic Programming | June 1st, 2008 | No Comments »
The first step to get us on our way to programming in PHP would be to set up an ideal development environment. You need a Web Server software like Apache (which would be what we are going to use) which is only one of many out there. Most of these web servers are open-source meaning that they are free. Now, being free doesn�t mean that they are not up to standards for there are standards that are set by independent groups that are comprised of the many developers who together formulate or give a loosely defined set of standards for others to follow. Apache has versions for Linux but there are also for the Windows, Unix and Mac OS. The installer can be downloaded along with the detailed manual from PHP.net
Posted in News | May 28th, 2008 | No Comments »
Many web designers and programmers are in the look out for the latest PHP6. But there is no need to torture yourself for waiting that long. Everything that is expected to come out in PHP 6 can also be expected from PHP 5.3.
This will be such a good news for those programmers who want to use the new features, but their hosting providers are not yet ready for an upgrade to PHP 6 soon. Many companies will probably wait for 6.1 to be released before upgrading.
The new features offered by PHP 5.3 are namespaces, late static binding mysqlnd.
Posted in Basics | May 26th, 2008 | No Comments »
PHP is an acronym for Hypertext Preprocessor, used to design for designing web pages that are dynamic.
It was originally created by Rasmus Lerdorf in 1995 but is now produced and maintained by The PHP Group. It is considered as a free software by the Free Software Foundation.
It is widely-used as scripting language for web development and can be embedded into HTML. It has PHP codes as an input, and the web page as an output and it runs on a web server.
PHP began on 1994 and originally stood for Personal Home Page. The tools that Lerdorf created was used to display his resume on his webpage and to keep track of the traffic that his webpage is getting.
Posted in Basics | May 24th, 2008 | No Comments »
When writing an internet address in the address bar of the browser and clicking enter to start going to that address, you send a request to the web server and it will follow the address of the URL and will pick up all the contents of the target location.
Always keep in mind that whatever you see in the browser an output of the HTML of the actual code of the web page that you have requested.
What is parsing? It is the process of converting of the code to the HTML that you desire by the engines of the web parser’s servers.
When requesting the URL, the web server will follow the location and request for the contents in that server.
Posted in Basic Programming | May 20th, 2008 | No Comments »
Variables are used to temporarily keep or store something that you want to save. When the time comes that you will be needing them, recall the variables and they will give you the information that you stored for you to change, delete or edit it.
$message = "Hello Haroon";
echo "PHP Tutorial";
echo $message;
?>
‘Hello Haroon’ is the information that you want to save temporarily, while the message ‘PHP Tutorial’ is displayed.
The output of the program will be: PHP TutorialHello Haroon
In PHP, $ is used to define a variable. PHP, unlike C or Java, is a loose-typing scripting language.
Posted in Basic Programming | May 15th, 2008 | No Comments »
Like in other languages, PHP codes always start with tag.
One example of a code is written below:
echo "PHP ! I am gonna get you.";
?>
The above code contains only three lines. We started the code with the like mentioned in the first sentence. The ECHO code helps you display combinations of strings and variables in your desired page. Always remember that whatever you want to display in your page must start and end with a double quotation mark. The semi-colon (;) is essential and means that it is the end statement in an PHP code.