Tuesday, August 7, 2012

PHP- Part-Three

hi all,

This time we are going to write our first web page using PHP scripting language. We can use notepad or wordpad for write our codes.Whatever you use, it's very easy to handle if it is simple text editor.
In HTML language we use,
 <html>......</html> tags to define that this is a html document. Like html we use,
     <? php  
       ?>
tags for define a php. <?php tag starts the php part and ?> tag finish the php part.
  • Print a Sentence  or a word

How we print a letter or sentences in a web page? It is very easy. We use echo or print key words to do that. Let's try to write "Hello PHP !" using PHP.

<?php
echo "Hello PHP !";
?>

or you can use,

<?php
print "Hello PHP !";
?>

Above both are correct. It gives the same result by printing Hello World ! in the browser.
We use semicolon (;) to notify to computer that the statement is end here. Hence we began new statement. Keep it on your mind. Try some words, sentences using echo keyword. Often programmers use echo instead of print keyword.
  • Comments in PHP

Comments are very important in any languages. It clearly organize our codes. It will help us to read codes without having any confuse. We use // (double forward slash) for single line comment and  /*comment*/ for multi-line line comments.

<?php
// This is a single line comment
?>

<?php
/* This is
a multi-line
comment */
?>

hope to see you in next part
Enjoy !

Thursday, July 26, 2012

PHP part - two

Hi all,

In this post we discuss how to install WAMP server. It is very easy.Previous post I gave a link to download the WAMP server. I know it is not a direct link. So this is some direct link for WAMP Server

1. Download from given link..

2. Your download file name is WampServer2.2a-x32 or something similar to this and double click on it to run the file.


3.This is the opening window and click on the next....



4.WAMP is a open source software under the GPL(Genaral Public License). Choose "I accept the agreement " and click Next.

5. If there is enough space in C drive then no need t change the directory. continue with Next...



6. If you want to add desktop icon or quick launch icon of the WAMP Server then check the boxes. Continue..


7. Install the product by clicking install in the window...




6. Check the option "Launch wamp server now" and finish. Or  go to start menu and type "wamp" then click "start wamp server" icon to run it. If all are working correctly you can see green color icon on your screen.


7. Go to C directory(your installed directory) and there you can see folder named "wamp". Inside the wamp folder there is a subfolder named "www". Inside it create a folder and name it as "PHP". All your .php files must save here otherwise it won't work. You can use www folder also for the save .php files. But it is very easy if you can create a folder like php to save your files inside the www folder.

8. Go to your browser and type "localhost"(without double quotes) or "http://localhost" and enter. If your wamp server working correct then you will get page like below. localhost means www folder and displays the index.php file which inside the www folder. Type "http://localhost/php/yourFileName.php" to run your .php files.


This is the end of installing part. Next post I'll tel you how to write your first php file. I think this is the easiest way to install php to your pc.
Now your computer ready to php and now your chance to write php codes.....
Enjoy !

Friday, July 20, 2012

PHP part - One

Hi all,

 So I'm going to start my first tutorial with PHP. I know you have lot of doubt about PHP. In this part I'm going to give you introduction about PHP.

   PHP is powerful tool for making dynamic and interactive web pages. It is an open source general-purpose scripting language. PHP can embed to a HTML web pages. PHP is the alternative to competitors such as Microsoft's ASP. PHP is one of most popular web designing language all over the world. PHP is installed on more than 20 million Web sites and 1 million Web servers. Software that uses PHP includes Joomla, Wordpress, Concrete5, MyBB, and Drupal.

   PHP created by Rasmus Lerdorf, is a Danish programmer with Canadian citizenship in 1995. In that time he used acronym for PHP as a Personal Home Page. Zeev Suraski and Andi Gutmans, two Israeli developers at the Technion IIT, rewrote the parser in 1997 and formed the base of PHP 3, changing the language's name to the recursive initialism PHP: Hypertext Preprocessor. Afterward, public testing of PHP 3 began, and the official launch came in June 1998.On May 22, 2000, PHP 4, powered by the Zend Engine 1.0, was released. On July 13, 2004, PHP 5 was released, powered by the new Zend Engine II.

   PHP is a general-purpose scripting language that is especially suited to server-side web development where PHP generally runs on a web server. Any PHP code in a requested file is executed by the PHP runtime, usually to create dynamic web page content or dynamic images used on Web sites or elsewhere. It can also be used for command-line scripting and client-side graphical user interface (GUI) applications. PHP can be deployed on most Web servers, many operating systems and platforms, and can be used with many relational database management systems (RDBMS). It is available free of charge, and the PHP Group provides the complete source code for users to build, customize and extend for their own use.


Before you continue you should have a basic understanding of the following:
  • HTML/XHTML
  • JavaScript
From here after we are going start our journey of PHP scripting language. Before you are going to start your journey you must create PHP server, because PHP is a server side scripting language. easy way to create a PHP server is to download a WAMP server. WAMP server is a package which include Apache server, MySQL database software and basic components which help to PHP language. You can download your WAMP server from download WAMP,It is free and open source. Next part is about installation and configuration.

Enjoy !









Wednesday, July 18, 2012

Reason to start..

Hello,

I'm Gaaza.. So this blog is created to give you some knowledge about Information Technology related subjects such as Information Systems, New Trends in IT , Web Designing & Development, Programming, Animation, Graphic Designing etc. I think this blog will be water to who has thirsty of IT subjects and hope you all enjoy...

Thanks
Gaaza