SlideShare ist ein Scribd-Unternehmen logo
1 von 22
WHAT IS PHP PHP is a reflective programming language. Design for producing web pages. PHP is used for server side scripting. PHP is also called ‘HYPERTEXT PREPROCESSER’.
WHY PHP IS USED 1.EASY TO USE Code is embeded in HTML .The php code is enclosed in special start and tags that allow you to jump into and out of the php mode. SYNTAX <HTML> <TITLE></TITLE> <BODY> <?PHP   -------------- ?> </BODY> </HTML>
WHY PHP IS USED 2.CROSS PLATFORM  WEB SERVERS:  apache,wamp  OPERATING SYSTEM: unix,windows 2000,xp  DATBASES: mysql,oracle
3.COST BENIFITS ,[object Object]
THE ADDON TECHNOLOGIES USED IN PHP ARE ALSO FREE.EXAMPLE: i.software ii.Platform iii.tools
4.FAST & STABLE PHP is server side scripting language hence no additional plugins required. The exicution of php language is fast. The php is a stable language.
BASICS OF PHP *Lines end with semicolon(;). *Code block placed in braces. {    //code;   } *White space ignored. *Comment //comment(single line) /* ------(multiple line) */
BASICS OF PHP *SHORT PHP DELIMETERS <? statement; ?> *ASSIGN VALUE BY USING ‘=‘ OPERATOR. eg:  a=5; *PREFIX OPERATOR ‘$’ . *NO NEED TO DEFINE DATA TYPE.
BASICS OF PHP *VARIABLE NAME CASE SENSATIVE(NOT STATICALLY TYPED). *ESCAPE SEQUENCE ‘/’. *METHOD  (i) GET       ($_get)  (ii) POST       ($_post)
VARIABLE TYPES * BOOLEAN *ARRAY *INTEGER *FLOAT *STRING *OBJECT *DOUBLE
 PHP mail() – send email PHP mail() function is used for sending emails from your website. Syntax of mail() function is :  mail (to email , Subject of email , email message , header ,        additional parameters ); Here First parameter will be the email address of the receiver Second parameter will be the Subject ( title ) of your email Third parameter will be the content of your email , you can use html tags and all for proper formatting Third parameter is the header of your email, it will contain all the properties and setting for that email , sender email address also should specify in header , we can also add reply to address , format of email etc in header. Using detailed header is a good practice .
    ECHO in PHP echo is using for output one or more strings in PHP. echo is basically a language construct and not a function. So we can use without parentheses with it. We can use the HTML formatting tags with PHP echo statement See the following sample program with echo in PHP programs <?php echo "Good Morning";  ?>  Its out put will be :Good morning
   IF STATEMENT “if” statement is one of the most important and most used construct in PHP programming. Its syntax will look like if  (expression){// Operation statements} if statement’s return result will be a Boolean value like TRUE or FALSE. If the expression with “if statement” returns TRUE, the Operation Statements will execute , otherwise it will ignore the statements.
Array in PHP  Array is a special variable which can store multiple value. ( Note : a normal variable can store only one value at a time ). Arrays are the oldest and most important data structure which can hold multiple values. Each value in an array is associated with a key. And we can retrieve each value from array using the keys. Arrays can be mainly two types One-dimensional arrays Multidimensional arrays Array in PHP can be categorized as Numeric arrays Associative array Multidimensional array In PHP array can be declared using the construct array()
FOREACH ARRAY foreach statement is used for making loop over array in loop. It will work only with arrays, and will make errors if we try it with other data types.foreach statement can be used in two ways.. See the following two structures of foreach loop in PHP foreach (array as $value){// Operation statement} foreach (array as $key => $value){// Operation statement} Difference between these two syntax are In the first “foreach” statement , value of each array’s element will be assigned to the variable $value In the second “foreach” statement, key of each array’s element will be assigned to the variable $key
PHP cookie  Cookie is a variable stored in the user computer. Its a mechanism to store the data for future use. Cookies are part of HTTP header and will passed to the server when the site is accessing in browser.We can use cookies for knowing the return visitors or for storing a value in user computer. In PHP cookie is create using setcookie() function. And this function should be called in your PHP program before any output is sent to the user computer browser .We can store multiple values in a single cookie by declare the cookie as an array ( using [] with cookie variable name ).Here is the syntax for creating a cookiesetcookie (name, value, expiration time , path to store , domain name);  Consider a case. In our website there is a form to enter user’s name. And we need to store that name in his computer for next 30 days.Now we need to plan a cookie name for this, and we decided to put the name as “user_name”.
DATABASE Database is a computer based record keeping system. Rows in database called tuples. NULL !=0 TYPES: It has two types- i.Centralized ii.Distributed
KEYS CANDDATE KEYS retrive rows. SUPER KEYS set of candidate keys. PRIMARY KEYS this is unique not null. FOREGIEN KEYS join two databases.
MYSQL It is a non procedural programming language. QUERIES: >Creating database in sql server    Create database college >Create table student use college database    create table student    (      name char(25),      age int,      city char(23),      address char(34)     )
QUERIES >Insert data into table use college   insert into student values('ashok','34','udaipur','payada') >Display insert data    select * from student >SQL WHERE command : TheSQL WHERE clause is used to select data conditionally, by adding it to already existing SQL SELECT query. SELECT * FROM Customers WHERE Last_Name = 'Smith'
QUERIES >Modify the Structure of table 1 Adding new column into table alter table student add pincodeint 2 Delete column name use college    Alter table student drop column pincode 3 Delete Database    Drop database databasename
QUERIES >ORDER BY  The SQL ORDER BY clause comes in handy when you want to sort     your SQL resultsets by some column(s). For example if you want to select all the persons from the already familiar Customers table and order the result by date of birth, you will use the following statement: SELECT * FROM Customers ORDER BY DOB >AND  The SQL AND clause is used when you want to specify more than one condition inyour SQL WHERE clause, and at the same time you want all conditions to be true. SELECT * FROM Customers WHERE First_Name = 'John' AND Last_Name = 'Smith'

Weitere ähnliche Inhalte

Was ist angesagt?

Idoc script beginner guide
Idoc script beginner guide Idoc script beginner guide
Idoc script beginner guide Vinay Kumar
 
The Big Documentation Extravaganza
The Big Documentation ExtravaganzaThe Big Documentation Extravaganza
The Big Documentation ExtravaganzaStephan Schmidt
 
Inroduction to XSLT with PHP4
Inroduction to XSLT with PHP4Inroduction to XSLT with PHP4
Inroduction to XSLT with PHP4Stephan Schmidt
 
Web technology html5 php_mysql
Web technology html5 php_mysqlWeb technology html5 php_mysql
Web technology html5 php_mysqldurai arasan
 
Dynamic Web Pages Ch 1 V1.0
Dynamic Web Pages Ch 1 V1.0Dynamic Web Pages Ch 1 V1.0
Dynamic Web Pages Ch 1 V1.0Cathie101
 
Php1
Php1Php1
Php1Reka
 
Web Development Course: PHP lecture 1
Web Development Course: PHP lecture 1Web Development Course: PHP lecture 1
Web Development Course: PHP lecture 1Gheyath M. Othman
 
Open Source Package Php Mysql 1228203701094763 9
Open Source Package Php Mysql 1228203701094763 9Open Source Package Php Mysql 1228203701094763 9
Open Source Package Php Mysql 1228203701094763 9isadorta
 
Mysqlppt
MysqlpptMysqlppt
MysqlpptReka
 
Lecture3 php by okello erick
Lecture3 php by okello erickLecture3 php by okello erick
Lecture3 php by okello erickokelloerick
 
Programming with php
Programming with phpProgramming with php
Programming with phpsalissal
 

Was ist angesagt? (18)

Php
PhpPhp
Php
 
PHP
PHPPHP
PHP
 
Idoc script beginner guide
Idoc script beginner guide Idoc script beginner guide
Idoc script beginner guide
 
The Big Documentation Extravaganza
The Big Documentation ExtravaganzaThe Big Documentation Extravaganza
The Big Documentation Extravaganza
 
Unit 1
Unit 1Unit 1
Unit 1
 
Inroduction to XSLT with PHP4
Inroduction to XSLT with PHP4Inroduction to XSLT with PHP4
Inroduction to XSLT with PHP4
 
Web technology html5 php_mysql
Web technology html5 php_mysqlWeb technology html5 php_mysql
Web technology html5 php_mysql
 
Php Learning show
Php Learning showPhp Learning show
Php Learning show
 
Dynamic Web Pages Ch 1 V1.0
Dynamic Web Pages Ch 1 V1.0Dynamic Web Pages Ch 1 V1.0
Dynamic Web Pages Ch 1 V1.0
 
Php1
Php1Php1
Php1
 
Web Development Course: PHP lecture 1
Web Development Course: PHP lecture 1Web Development Course: PHP lecture 1
Web Development Course: PHP lecture 1
 
Open Source Package Php Mysql 1228203701094763 9
Open Source Package Php Mysql 1228203701094763 9Open Source Package Php Mysql 1228203701094763 9
Open Source Package Php Mysql 1228203701094763 9
 
Mysqlppt
MysqlpptMysqlppt
Mysqlppt
 
Linker scripts
Linker scriptsLinker scripts
Linker scripts
 
Php Unit 1
Php Unit 1Php Unit 1
Php Unit 1
 
PHP MySQL
PHP MySQLPHP MySQL
PHP MySQL
 
Lecture3 php by okello erick
Lecture3 php by okello erickLecture3 php by okello erick
Lecture3 php by okello erick
 
Programming with php
Programming with phpProgramming with php
Programming with php
 

Andere mochten auch

Final Project - Baseball Hall of Fame
Final Project - Baseball Hall of FameFinal Project - Baseball Hall of Fame
Final Project - Baseball Hall of FameBernard ElDorrado
 
η συνταγματική αναθεώρηση
η συνταγματική αναθεώρησηη συνταγματική αναθεώρηση
η συνταγματική αναθεώρησηAphrodite Ghikas
 
mHabitat Digital Development Lab bootcamp
mHabitat Digital Development Lab bootcampmHabitat Digital Development Lab bootcamp
mHabitat Digital Development Lab bootcampYoomee
 
HCL Infosystem
HCL InfosystemHCL Infosystem
HCL InfosystemAnurag Dua
 
Mobility in healthcare
Mobility in healthcareMobility in healthcare
Mobility in healthcareYanbo Xue
 
\'Monastic Memento\'
\'Monastic Memento\'\'Monastic Memento\'
\'Monastic Memento\'chrismoc
 
Technology Implementation Plan.
Technology Implementation Plan.Technology Implementation Plan.
Technology Implementation Plan.Miguel Perdomo
 
History Notes - The Plantations
History Notes - The PlantationsHistory Notes - The Plantations
History Notes - The PlantationsNoel Hogan
 
Customer Buying Preference towards Laptops A Comparative Analysis of Lenovo a...
Customer Buying Preference towards Laptops A Comparative Analysis of Lenovo a...Customer Buying Preference towards Laptops A Comparative Analysis of Lenovo a...
Customer Buying Preference towards Laptops A Comparative Analysis of Lenovo a...Rahul Prakash
 

Andere mochten auch (19)

Hcl infosystem ltd
Hcl infosystem ltdHcl infosystem ltd
Hcl infosystem ltd
 
Sýnishorn
SýnishornSýnishorn
Sýnishorn
 
Sýnishorn
SýnishornSýnishorn
Sýnishorn
 
Final 8
Final 8Final 8
Final 8
 
Final Project - Baseball Hall of Fame
Final Project - Baseball Hall of FameFinal Project - Baseball Hall of Fame
Final Project - Baseball Hall of Fame
 
η συνταγματική αναθεώρηση
η συνταγματική αναθεώρησηη συνταγματική αναθεώρηση
η συνταγματική αναθεώρηση
 
mHabitat Digital Development Lab bootcamp
mHabitat Digital Development Lab bootcampmHabitat Digital Development Lab bootcamp
mHabitat Digital Development Lab bootcamp
 
Why use Yammer
Why use YammerWhy use Yammer
Why use Yammer
 
E newspaper
E newspaperE newspaper
E newspaper
 
HCL Infosystem
HCL InfosystemHCL Infosystem
HCL Infosystem
 
Mobility in healthcare
Mobility in healthcareMobility in healthcare
Mobility in healthcare
 
Capital school
Capital schoolCapital school
Capital school
 
Esped proj
Esped projEsped proj
Esped proj
 
\'Monastic Memento\'
\'Monastic Memento\'\'Monastic Memento\'
\'Monastic Memento\'
 
Technology Implementation Plan.
Technology Implementation Plan.Technology Implementation Plan.
Technology Implementation Plan.
 
Settlement
SettlementSettlement
Settlement
 
History Notes - The Plantations
History Notes - The PlantationsHistory Notes - The Plantations
History Notes - The Plantations
 
Hcl
HclHcl
Hcl
 
Customer Buying Preference towards Laptops A Comparative Analysis of Lenovo a...
Customer Buying Preference towards Laptops A Comparative Analysis of Lenovo a...Customer Buying Preference towards Laptops A Comparative Analysis of Lenovo a...
Customer Buying Preference towards Laptops A Comparative Analysis of Lenovo a...
 

Ähnlich wie Php

Open Source Package PHP & MySQL
Open Source Package PHP & MySQLOpen Source Package PHP & MySQL
Open Source Package PHP & MySQLkalaisai
 
Php interview questions
Php interview questionsPhp interview questions
Php interview questionssekar c
 
Php i basic chapter 3 (afifah rosli's conflicted copy 2013-04-23)
Php i basic chapter 3 (afifah rosli's conflicted copy 2013-04-23)Php i basic chapter 3 (afifah rosli's conflicted copy 2013-04-23)
Php i basic chapter 3 (afifah rosli's conflicted copy 2013-04-23)Muhamad Al Imran
 
Php i basic chapter 3 (syahir chaer's conflicted copy 2013-04-22)
Php i basic chapter 3 (syahir chaer's conflicted copy 2013-04-22)Php i basic chapter 3 (syahir chaer's conflicted copy 2013-04-22)
Php i basic chapter 3 (syahir chaer's conflicted copy 2013-04-22)Muhamad Al Imran
 
Php interview questions
Php interview questionsPhp interview questions
Php interview questionssubash01
 
Lecture2_IntroductionToPHP_Spring2023.pdf
Lecture2_IntroductionToPHP_Spring2023.pdfLecture2_IntroductionToPHP_Spring2023.pdf
Lecture2_IntroductionToPHP_Spring2023.pdfShaimaaMohamedGalal
 
Php by shivitomer
Php by shivitomerPhp by shivitomer
Php by shivitomerShivi Tomer
 
Justmeans power point
Justmeans power pointJustmeans power point
Justmeans power pointjustmeanscsr
 
Justmeans power point
Justmeans power pointJustmeans power point
Justmeans power pointjustmeanscsr
 
Justmeans power point
Justmeans power pointJustmeans power point
Justmeans power pointjustmeanscsr
 
Justmeans power point
Justmeans power pointJustmeans power point
Justmeans power pointjustmeanscsr
 
Justmeans power point
Justmeans power pointJustmeans power point
Justmeans power pointjustmeanscsr
 
Justmeans power point
Justmeans power pointJustmeans power point
Justmeans power pointjustmeanscsr
 
Justmeans power point
Justmeans power pointJustmeans power point
Justmeans power pointjustmeanscsr
 

Ähnlich wie Php (20)

Php
PhpPhp
Php
 
Php
PhpPhp
Php
 
Open Source Package PHP & MySQL
Open Source Package PHP & MySQLOpen Source Package PHP & MySQL
Open Source Package PHP & MySQL
 
Php interview questions
Php interview questionsPhp interview questions
Php interview questions
 
Php
PhpPhp
Php
 
Php i basic chapter 3
Php i basic chapter 3Php i basic chapter 3
Php i basic chapter 3
 
Php i basic chapter 3 (afifah rosli's conflicted copy 2013-04-23)
Php i basic chapter 3 (afifah rosli's conflicted copy 2013-04-23)Php i basic chapter 3 (afifah rosli's conflicted copy 2013-04-23)
Php i basic chapter 3 (afifah rosli's conflicted copy 2013-04-23)
 
Php i basic chapter 3 (syahir chaer's conflicted copy 2013-04-22)
Php i basic chapter 3 (syahir chaer's conflicted copy 2013-04-22)Php i basic chapter 3 (syahir chaer's conflicted copy 2013-04-22)
Php i basic chapter 3 (syahir chaer's conflicted copy 2013-04-22)
 
PHP Reviewer
PHP ReviewerPHP Reviewer
PHP Reviewer
 
Php interview questions
Php interview questionsPhp interview questions
Php interview questions
 
Lecture2_IntroductionToPHP_Spring2023.pdf
Lecture2_IntroductionToPHP_Spring2023.pdfLecture2_IntroductionToPHP_Spring2023.pdf
Lecture2_IntroductionToPHP_Spring2023.pdf
 
Php by shivitomer
Php by shivitomerPhp by shivitomer
Php by shivitomer
 
Introduction to php
Introduction to phpIntroduction to php
Introduction to php
 
Justmeans power point
Justmeans power pointJustmeans power point
Justmeans power point
 
Justmeans power point
Justmeans power pointJustmeans power point
Justmeans power point
 
Justmeans power point
Justmeans power pointJustmeans power point
Justmeans power point
 
Justmeans power point
Justmeans power pointJustmeans power point
Justmeans power point
 
Justmeans power point
Justmeans power pointJustmeans power point
Justmeans power point
 
Justmeans power point
Justmeans power pointJustmeans power point
Justmeans power point
 
Justmeans power point
Justmeans power pointJustmeans power point
Justmeans power point
 

Kürzlich hochgeladen

Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jisc
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentationcamerronhm
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxJisc
 
Philosophy of china and it's charactistics
Philosophy of china and it's charactisticsPhilosophy of china and it's charactistics
Philosophy of china and it's charactisticshameyhk98
 
How to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxHow to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxCeline George
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSCeline George
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Jisc
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsMebane Rash
 
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...Nguyen Thanh Tu Collection
 
Tatlong Kwento ni Lola basyang-1.pdf arts
Tatlong Kwento ni Lola basyang-1.pdf artsTatlong Kwento ni Lola basyang-1.pdf arts
Tatlong Kwento ni Lola basyang-1.pdf artsNbelano25
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17Celine George
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.MaryamAhmad92
 
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptxOn_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptxPooja Bhuva
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxheathfieldcps1
 
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxmarlenawright1
 
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Pooja Bhuva
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.christianmathematics
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...Nguyen Thanh Tu Collection
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsKarakKing
 
latest AZ-104 Exam Questions and Answers
latest AZ-104 Exam Questions and Answerslatest AZ-104 Exam Questions and Answers
latest AZ-104 Exam Questions and Answersdalebeck957
 

Kürzlich hochgeladen (20)

Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptx
 
Philosophy of china and it's charactistics
Philosophy of china and it's charactisticsPhilosophy of china and it's charactistics
Philosophy of china and it's charactistics
 
How to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxHow to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptx
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
 
Tatlong Kwento ni Lola basyang-1.pdf arts
Tatlong Kwento ni Lola basyang-1.pdf artsTatlong Kwento ni Lola basyang-1.pdf arts
Tatlong Kwento ni Lola basyang-1.pdf arts
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptxOn_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
 
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
 
latest AZ-104 Exam Questions and Answers
latest AZ-104 Exam Questions and Answerslatest AZ-104 Exam Questions and Answers
latest AZ-104 Exam Questions and Answers
 

Php

  • 1. WHAT IS PHP PHP is a reflective programming language. Design for producing web pages. PHP is used for server side scripting. PHP is also called ‘HYPERTEXT PREPROCESSER’.
  • 2. WHY PHP IS USED 1.EASY TO USE Code is embeded in HTML .The php code is enclosed in special start and tags that allow you to jump into and out of the php mode. SYNTAX <HTML> <TITLE></TITLE> <BODY> <?PHP -------------- ?> </BODY> </HTML>
  • 3. WHY PHP IS USED 2.CROSS PLATFORM WEB SERVERS: apache,wamp OPERATING SYSTEM: unix,windows 2000,xp DATBASES: mysql,oracle
  • 4.
  • 5. THE ADDON TECHNOLOGIES USED IN PHP ARE ALSO FREE.EXAMPLE: i.software ii.Platform iii.tools
  • 6. 4.FAST & STABLE PHP is server side scripting language hence no additional plugins required. The exicution of php language is fast. The php is a stable language.
  • 7. BASICS OF PHP *Lines end with semicolon(;). *Code block placed in braces. { //code; } *White space ignored. *Comment //comment(single line) /* ------(multiple line) */
  • 8. BASICS OF PHP *SHORT PHP DELIMETERS <? statement; ?> *ASSIGN VALUE BY USING ‘=‘ OPERATOR. eg: a=5; *PREFIX OPERATOR ‘$’ . *NO NEED TO DEFINE DATA TYPE.
  • 9. BASICS OF PHP *VARIABLE NAME CASE SENSATIVE(NOT STATICALLY TYPED). *ESCAPE SEQUENCE ‘/’. *METHOD (i) GET ($_get) (ii) POST ($_post)
  • 10. VARIABLE TYPES * BOOLEAN *ARRAY *INTEGER *FLOAT *STRING *OBJECT *DOUBLE
  • 11. PHP mail() – send email PHP mail() function is used for sending emails from your website. Syntax of mail() function is : mail (to email , Subject of email , email message , header , additional parameters ); Here First parameter will be the email address of the receiver Second parameter will be the Subject ( title ) of your email Third parameter will be the content of your email , you can use html tags and all for proper formatting Third parameter is the header of your email, it will contain all the properties and setting for that email , sender email address also should specify in header , we can also add reply to address , format of email etc in header. Using detailed header is a good practice .
  • 12. ECHO in PHP echo is using for output one or more strings in PHP. echo is basically a language construct and not a function. So we can use without parentheses with it. We can use the HTML formatting tags with PHP echo statement See the following sample program with echo in PHP programs <?php echo "Good Morning"; ?> Its out put will be :Good morning
  • 13. IF STATEMENT “if” statement is one of the most important and most used construct in PHP programming. Its syntax will look like if  (expression){// Operation statements} if statement’s return result will be a Boolean value like TRUE or FALSE. If the expression with “if statement” returns TRUE, the Operation Statements will execute , otherwise it will ignore the statements.
  • 14. Array in PHP Array is a special variable which can store multiple value. ( Note : a normal variable can store only one value at a time ). Arrays are the oldest and most important data structure which can hold multiple values. Each value in an array is associated with a key. And we can retrieve each value from array using the keys. Arrays can be mainly two types One-dimensional arrays Multidimensional arrays Array in PHP can be categorized as Numeric arrays Associative array Multidimensional array In PHP array can be declared using the construct array()
  • 15. FOREACH ARRAY foreach statement is used for making loop over array in loop. It will work only with arrays, and will make errors if we try it with other data types.foreach statement can be used in two ways.. See the following two structures of foreach loop in PHP foreach (array as $value){// Operation statement} foreach (array as $key => $value){// Operation statement} Difference between these two syntax are In the first “foreach” statement , value of each array’s element will be assigned to the variable $value In the second “foreach” statement, key of each array’s element will be assigned to the variable $key
  • 16. PHP cookie Cookie is a variable stored in the user computer. Its a mechanism to store the data for future use. Cookies are part of HTTP header and will passed to the server when the site is accessing in browser.We can use cookies for knowing the return visitors or for storing a value in user computer. In PHP cookie is create using setcookie() function. And this function should be called in your PHP program before any output is sent to the user computer browser .We can store multiple values in a single cookie by declare the cookie as an array ( using [] with cookie variable name ).Here is the syntax for creating a cookiesetcookie (name, value, expiration time , path to store , domain name); Consider a case. In our website there is a form to enter user’s name. And we need to store that name in his computer for next 30 days.Now we need to plan a cookie name for this, and we decided to put the name as “user_name”.
  • 17. DATABASE Database is a computer based record keeping system. Rows in database called tuples. NULL !=0 TYPES: It has two types- i.Centralized ii.Distributed
  • 18. KEYS CANDDATE KEYS retrive rows. SUPER KEYS set of candidate keys. PRIMARY KEYS this is unique not null. FOREGIEN KEYS join two databases.
  • 19. MYSQL It is a non procedural programming language. QUERIES: >Creating database in sql server Create database college >Create table student use college database create table student ( name char(25), age int, city char(23), address char(34) )
  • 20. QUERIES >Insert data into table use college insert into student values('ashok','34','udaipur','payada') >Display insert data select * from student >SQL WHERE command : TheSQL WHERE clause is used to select data conditionally, by adding it to already existing SQL SELECT query. SELECT * FROM Customers WHERE Last_Name = 'Smith'
  • 21. QUERIES >Modify the Structure of table 1 Adding new column into table alter table student add pincodeint 2 Delete column name use college Alter table student drop column pincode 3 Delete Database Drop database databasename
  • 22. QUERIES >ORDER BY The SQL ORDER BY clause comes in handy when you want to sort your SQL resultsets by some column(s). For example if you want to select all the persons from the already familiar Customers table and order the result by date of birth, you will use the following statement: SELECT * FROM Customers ORDER BY DOB >AND The SQL AND clause is used when you want to specify more than one condition inyour SQL WHERE clause, and at the same time you want all conditions to be true. SELECT * FROM Customers WHERE First_Name = 'John' AND Last_Name = 'Smith'
  • 23. THANK YOU