php training institute in ambala ! batra computer centre

29
Ph. No. :9729666670,4000670 Website: www.batracomputercentre.com BATRA COMPUTER CENTRE Email: [email protected] PHP TRAINING IN AMBALA

Upload: jatin-batra

Post on 14-Apr-2017

6 views

Category:

Education


1 download

TRANSCRIPT

Page 1: PHP Training Institute in Ambala ! Batra Computer Centre

Ph. No. :9729666670,4000670 Website: www.batracomputercentre.com

BATRA COMPUTER CENTRE Email: [email protected]

PHP TRAINING IN

AMBALA

Page 2: PHP Training Institute in Ambala ! Batra Computer Centre

Ph. No. :9729666670,4000670 Website: www.batracomputercentre.com

BATRA COMPUTER CENTRE Email: [email protected]

Page 3: PHP Training Institute in Ambala ! Batra Computer Centre

ContentIntroductionWhat Can PHP Do?Why PHP?Syntax of PHP CodeExample of PHP CodeComments

Ph. No. :9729666670,4000670 Website: www.batracomputercentre.com

BATRA COMPUTER CENTRE Email: [email protected]

VariablesData TypesConditional StatementsLoopsAdvantages of PHPAbout Us

Page 4: PHP Training Institute in Ambala ! Batra Computer Centre

Introduction

• PHP stands for Hypertext Preprocessor. • PHP is a powerful and widely-used open

source server-side scripting language to write dynamically generated web pages.

• PHP scripts are executed on the server and the result is sent to the browser as plain HTML.

• PHP can be embedded within a normal HTML web pages.

Ph. No. :9729666670,4000670 Website: www.batracomputercentre.com

BATRA COMPUTER CENTRE Email: [email protected]

Page 5: PHP Training Institute in Ambala ! Batra Computer Centre

Ph. No. :9729666670,4000670 Website: www.batracomputercentre.com

BATRA COMPUTER CENTRE Email: [email protected]

Page 6: PHP Training Institute in Ambala ! Batra Computer Centre

What can PHP do ?

• PHP can generate dynamic page content• PHP can create, open, read, write, delete, and

close files on the server• PHP can collect form data• PHP can send and receive cookies• PHP can add, delete, modify data in your database• PHP can be used to control user-access• PHP can encrypt data

Ph. No. :9729666670,4000670 Website: www.batracomputercentre.com

BATRA COMPUTER CENTRE Email: [email protected]

Page 7: PHP Training Institute in Ambala ! Batra Computer Centre

Why PHP ?

• PHP runs on various platforms (Windows, Linux, Unix, Mac OS X, etc.)

• PHP is compatible with almost all servers used today (Apache, IIS, etc.)

• PHP supports a wide range of databases• PHP is free. Download it from the official PHP

resource: www.php.net• PHP is easy to learn and runs efficiently on the

server side

Ph. No. :9729666670,4000670 Website: www.batracomputercentre.com

BATRA COMPUTER CENTRE Email: [email protected]

Page 8: PHP Training Institute in Ambala ! Batra Computer Centre

Syntax of PHP

• Standard PHP Syntax:A PHP script starts with the <?php and ends with the ?> tag.The PHP delimiter <?php and ?> in the following example simply tells the PHP engine to treat the enclosed code block as PHP code, rather than simple HTML.

Ph. No. :9729666670,4000670 Website: www.batracomputercentre.com

BATRA COMPUTER CENTRE Email: [email protected]

Page 9: PHP Training Institute in Ambala ! Batra Computer Centre

• Embedding PHP using HTML:PHP files are plain text files with .php extension. Inside a PHP file you can write HTML like you do in regular HTML pages as well as embed PHP codes for server side execution.

Ph. No. :9729666670,4000670 Website: www.batracomputercentre.com

BATRA COMPUTER CENTRE Email: [email protected]

Page 10: PHP Training Institute in Ambala ! Batra Computer Centre

Example of PHP Code<!DOCTYPE HTML><html><head> <title>PHP Application</title></head><body> <?php // Display greeting message echo 'Hello World!'; ?></body></html>

Ph. No. :9729666670,4000670 Website: www.batracomputercentre.com

BATRA COMPUTER CENTRE Email: [email protected]

Page 11: PHP Training Institute in Ambala ! Batra Computer Centre

PHP Comments

• A comment in PHP code is a line that is not read/executed as part of the program.

• PHP support single-line as well as multi-line comments.

• To write a single-line comment either start the line with either two slashes (//) or a hash symbol (#).

Ph. No. :9729666670,4000670 Website: www.batracomputercentre.com

BATRA COMPUTER CENTRE Email: [email protected]

Page 12: PHP Training Institute in Ambala ! Batra Computer Centre

Ph. No. :9729666670,4000670 Website: www.batracomputercentre.com

BATRA COMPUTER CENTRE Email: [email protected]

Page 13: PHP Training Institute in Ambala ! Batra Computer Centre

Variables in PHP

• In PHP, a variable does not need to be declared before adding a value to it. PHP automatically converts the variable to the correct data type, depending on its value.

• After declaring a variable it can be reused throughout the code.

• The assignment operator (=) used to assign value to a variable.

Ph. No. :9729666670,4000670 Website: www.batracomputercentre.com

BATRA COMPUTER CENTRE Email: [email protected]

Page 14: PHP Training Institute in Ambala ! Batra Computer Centre

Ph. No. :9729666670,4000670 Website: www.batracomputercentre.com

BATRA COMPUTER CENTRE Email: [email protected]

Page 15: PHP Training Institute in Ambala ! Batra Computer Centre

Data Types in PHP

• PHP supports total eight primitive data types: Integer, Floating point number or Float, String, Booleans, Array, Object, resource and NULL.

• These data types are used to construct variables.

Ph. No. :9729666670,4000670 Website: www.batracomputercentre.com

BATRA COMPUTER CENTRE Email: [email protected]

Page 16: PHP Training Institute in Ambala ! Batra Computer Centre

Ph. No. :9729666670,4000670 Website: www.batracomputercentre.com

BATRA COMPUTER CENTRE Email: [email protected]

Page 17: PHP Training Institute in Ambala ! Batra Computer Centre

Conditional Statements

Ph. No. :9729666670,4000670 Website: www.batracomputercentre.com

BATRA COMPUTER CENTRE Email: [email protected]

Page 18: PHP Training Institute in Ambala ! Batra Computer Centre

Loops in PHP

Ph. No. :9729666670,4000670 Website: www.batracomputercentre.com

BATRA COMPUTER CENTRE Email: [email protected]

Page 19: PHP Training Institute in Ambala ! Batra Computer Centre

ADVANTAGES OF PHP

Ph. No. :9729666670,4000670 Website: www.batracomputercentre.com

BATRA COMPUTER CENTRE Email: [email protected]

Page 20: PHP Training Institute in Ambala ! Batra Computer Centre

• Easy to learn: PHP is easy to learn and use. For beginner programmers who just started out in web development, PHP is often considered as the best and preferable choice of scripting language to learn.

Ph. No. :9729666670,4000670 Website: www.batracomputercentre.com

BATRA COMPUTER CENTRE Email: [email protected]

Page 21: PHP Training Institute in Ambala ! Batra Computer Centre

• Portability: PHP runs on various platforms such as Microsoft Windows, Linux, Mac OS, etc. and it is compatible with almost all servers used today such Apache, IIS, etc.

Ph. No. :9729666670,4000670 Website: www.batracomputercentre.com

BATRA COMPUTER CENTRE Email: [email protected]

Page 22: PHP Training Institute in Ambala ! Batra Computer Centre

Ph. No. :9729666670,4000670 Website: www.batracomputercentre.com

BATRA COMPUTER CENTRE Email: [email protected]

• Fast Performance: Scripts written in PHP usually execute faster than those written in other scripting languages like ASP.NET or JSP.

• Vast Community: Since PHP is supported by the worldwide community, finding help or documentation for PHP online is extremely easy.

Page 23: PHP Training Institute in Ambala ! Batra Computer Centre

BATRA COMPUTER CENTRE Email: [email protected]

Ph. No. :9729666670,4000670 Website: www.batracomputercentre.com

• Open source: PHP is an open-source project — the language is developed and maintained by a worldwide community of developers who make its source code freely available to download and use. There are no costs associated with using PHP for individual or commercial projects, including future updates.

Page 24: PHP Training Institute in Ambala ! Batra Computer Centre

Ph. No. :9729666670,4000670 Website: www.batracomputercentre.com

BATRA COMPUTER CENTRE Email: [email protected]

Page 25: PHP Training Institute in Ambala ! Batra Computer Centre

Ph. No. :9729666670,4000670 Website: www.batracomputercentre.com

BATRA COMPUTER CENTRE Email: [email protected]

Page 26: PHP Training Institute in Ambala ! Batra Computer Centre

About Us

Ph. No. :9729666670,4000670 Website: www.batracomputercentre.com

BATRA COMPUTER CENTRE Email: [email protected]

We have own Centre library that has sufficient books of great authors for our students.Notes prepared by our teachers are provides to every student fortheir review. We also provideparticular software’s our studentson which they are pursuing their courses. Extra classes are given to those students who need some extra time or in case miss due to some reason.

Page 27: PHP Training Institute in Ambala ! Batra Computer Centre

Ph. No. :9729666670,4000670 Website: www.batracomputercentre.com

BATRA COMPUTER CENTRE Email: [email protected]

Page 28: PHP Training Institute in Ambala ! Batra Computer Centre

Ph. No. :9729666670,4000670 Website: www.batracomputercentre.com

BATRA COMPUTER CENTRE Email: [email protected]

BATRA COMPUTER CENTRE

SCO 15, Dayal Bagh, Near Hanuman Mandir, Ambala Cantt. Phn No.: 9729666670,0171-4000670 Email: [email protected] Website: www.batracomputercentre.com

CONTACT US

Page 29: PHP Training Institute in Ambala ! Batra Computer Centre

Ph. No. :9729666670,4000670 Website: www.batracomputercentre.com

BATRA COMPUTER CENTRE Email: [email protected]