0% found this document useful (0 votes)
24 views

PHP PPT Internship

PHP PPT Internship

Uploaded by

devesh.infusion
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views

PHP PPT Internship

PHP PPT Internship

Uploaded by

devesh.infusion
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 10

Enrolment:

216470316035
Name: Ved N. Patel
Enrolment:
216470316034

PHP Introduction

 What is PHP?
 PHP stands for PHP: Hypertext Preprocessor.
 PHP is a server side scripting language, like ASP.
 PHP scripts are executed on the server.
 PHP supports many databases (MySQL, Informix,
Oracle, Sybase, Solid, PostgreSQL, Generic ODBC, etc).
 PHP is an open source software.
 PHP is free to download and use.
 PHP is similar to JavaScript, only on a server side
language.
 PHP code is embedded in HTML using tags.
PHP Introduction

 What is a PHP file?
 PHP files can contain text, HTML tags and scripts
 PHP files are returned to the browser as plain HTML
 PHP files have a file extension of “.php”, “.php3”, or
“.phtml”

 When a page was requested, the server recognizes PHP


content via the file extension (.php).
 The server executes the PHP code, and the PHP page results
is showing to the client as HTML page.
 The PHP codes never appear to users, only the output in the
HTML page.
What is MySQL?

 MySQL is a database server.
 MySQL is ideal for both small and large applications.
 MySQL supports standard SQL.
 MySQL compiles on a number of platforms.
 MySQL is free to download and use.
 PHP + MySQL
 PHP combined with MySQL are cross-platform (you can develop in
windows and serve in Unix Platform).
 Why PHP?
 PHP runs in a different platforms(windows, Linux, Unix, etc).
 PHP is FREE to download from the official PHP resource:
www.php.net
 PHP is easy to learn and runs efficiently on the server side.
Where to start?

 What do you need?
 If your server supports PHP you don’t need to do anything.
 Just create some .php files in your web directory, and the server will
parse them for you. Because it is free, most web hosts offer PHP
support.
 However if your server does not support PHP, you must install PHP.
 To get access to a web server with PHP support, you can:
 Install XAMPP Apache on your own server, install PHP and MySQL.
 Or find a web hosting plan with PHP and MySQL support.
 If you download and Install XAMPP Apache server, you will find PHP,
and MySQL already existed inside the XAMPP application. But if you
want to install each one separately then follow these links:
 Download PHP for free here: http://www.php.net/downloads.php
 Download MySQL for free here: http://www.mysql.com/download s/
PHP Syntax

 PHP code is executed on the server, and the plain HTML
result is sent to the browser
 Basic PHP Syntax
 A PHP scripting block always starts with <?php and
ends with ?>. A PHP scripting block can be place
anywhere in the document.
 On servers with shorthand support enabled you can
start scripting block with <? and end with ?>.
 For maximum capability, we recommend that you use
the standard form (<?php) rather then the shorthand
form.
PHP Syntax


A PHP file normally contains HTML tags, just like an HTML file, and
some PHP scripting code.

 We have an example of a simple PHP script which sends the text


“HELLO WORLD” to the browser.

 Each code line in PHP must end with a semicolon is a seperator and is
used to distinguished one set of instructions from another.

 There are two basic statements to output text with PHP: echo and
print. In the example we have used the echo statement to output the
text “HELLO WORLD”.

 NOTE:- The file must have a .php extension. If the file have a .html
extension, the PHP code will not be executed
Comments in PHP

 In PHP, we use // to make a single-line
comment.
 Or /* and */ to make a large comment block.
PHP Variables

 A variable is used to store information.

 Variables in PHP
 Variables are used for storing values, like text strings,
numbers or arrays.
 When a variable is declared, it can be used over and
over again in your script.
 All variables in PHP starts with a $ sign symbol.
 The correct way of declaring a variable in PHP:
 $var_name=value;

THANK YOU

You might also like