0% found this document useful (0 votes)
5 views42 pages

PHP Web

Uploaded by

Ayesha
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views42 pages

PHP Web

Uploaded by

Ayesha
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 42

UNIT-1

rur

Aduantage,Jitadvantogeg 7
PHP
charaeteriebies,
0Lotodudion, ovetvieu,
DecNavinq Varinbles in PHP obj.t, sou,

Brnloan, Dble, String,Aray,


DabaDaba types Ph atener,
In PrecedenceAssotcbviby
Opexatovs P
S) pvestions
m
P
ic PHP
Sessio handliq
Cookies PH +Jse, Je, Sui
ndsm0
stgbwens(if, fov, oreaun)
onhro
Struaures
(ontraloops (hle, dowhde
write, cJose)
n ead,
ehandl PHP
open
hand poade rdhed)
lrtvalaet and post
hurlg
ov)ovm

town
sbng Disetoaies PHP
in
StopeonHbme t a Nariable
rererna
1 onnetr database ys. as a
CH NAG ENDRA
Lhoduehom o PHP SAL

PHPwas developacdinhe yeat 199 byApashe qtp.


t a widoly ted open Sourte ganetay purpose Sksipting Vang
+hat is
Epecia0y ued
ot web devdoprment
PHP Stands or hype tet Preproessot i s c00.J
aj
pesonoX homepage
PHP is a Server Side Seripting anquage t i mainy used fo

ovm hendlng, database Ace, web develppment.


92U
-use

990

Suta
ode is wnten here

17
Exomple', -

ho #Al ".
"

tis Statment
's ed to
whieh
9enerat autput i >

Sceip Stots iwih <php ond ands with 2


Jn above exomp
we uSe buttPHuni echo

P p
aput"H0." coweb
ends wtb Sern (oVon
phpphp Sttsrmurts
Ovevie of php'.

mbedeed
PhP a Server Side Scniding Yanquoqe

ASP.NET,
XHTML. T t an Altrnatve t hT, AsP,

JP. ono (natrusai Ackve


Tava SevUu Lte fa Server Page
Poge
Bten ien o p PPPhpa, phtml

there is
php make use ynacols yping that mean
no oezd to dsare Varia ble type in
php.
h ge OumbeY a r y o n s hteh maket
t PAexable develop (ode t php
php proaaso worKe n wo mo d

t p h p proustornds #TL tag lo the php &vipt


heloe Siroply lopied t outwt e
shan php proanod ds php ( h Smipt -then
Coeis Sinply nderstand and puti Gpied 4
output l..
bararteristbet"

e Can dawnload php with -frad lot in rtern=


O openour
O open
Stnca phr doot nlude brarynkmke
Juncm2ke
Snp:y
(, t ttruure Is Sienpe
lenty tuses Keaou r u
orhonmuhanhms objeab ,

Oiened Pvoqacnming,
Setuion manaqernent feábrd, So
eVcoinates
nate he unnetetsary
he
menoy AJNotsho),
Setuthy
tSuppot nevyshrn rehensoSeowrhy
Tab: ven xable onguae besouse t
Con be
Con be embedded wth , Css, Javapt
XML d
mony othon yanqunge and he

php lode Can be


u devi :ke
phone, Tabs, Yaptops e
obert OientedpheSuppot0ops tsvws.
Avataa
O E povtedbyW operatbq Syema ke windowl, Jnux,ch.
A t Gnearattd wt othen praraoning k
arg
4TM L, Jovaripts ett.
y onract wtth The dlababase t Store end
Tebrive data roo database
t ast proqromening anq uaqe lomparedt othen proqramming
arquag
php thomuaoki hrle Ore
stdto pat e
Pppbechos Altaks
Daavantaqes
Appeahent beaouse ti eoi
O otlableot Novge
mantanonce d:f%E

hondng opl famework oot qo

Dening Veriables in PHP

the Erikes that ae ustd Storing ta values


Vaviabes ore

ypedUanguaga y PHP ha noype


PHP sa dynamkally
isa

dedaratro
nn
k Variabe inlewir
The value Can be Augnedo
Variable. name Va
ta

he value n Asiped»
Variabe th by
dctaul vol ULL
nd Unauigned
}his Unauiq nud
hi
Variables are Cald Uabound Valabks and
Oul yaue a ovetd t the value 0

5tample
tt"hlo aryo Arign
Volueo a Vadable
5 put Qusts
0 5
nd it
O.
Net
t mut bPoltnad wh. ng Vaiabl
ts oitaaanu

php Voviablet Stovts uw Hh a by Variobh name

and phr Variable nacme are Calt Sensitive.. 19

php tree
Capito ente Srnal 1.tters drty

btaople
T
a
0, A 10
both are drent

Unden tort.
Variable must
manncr
wig

enples
Stovt wth nunbun.
(3Voriabl must noE
neric Va)ues
Variab les crust lontan m pha
Spalt in he Vaiae
There skerud nob be
the name

body rput 1 5
4 1php
eke fs t{y
0oCTYPE tm
htmly

-chody
php
Avarhiolge
echo T ove

3DATOT7PESN PHP

ustd in PHP.
here are ruStalar bype that ae

Lotget yp Stalen
Booantype typs

Dauble type o MoE


StigJ typt
Can o rnt
Store data
en Voriables

Qnd erent datatypes an, do J r u 4hings


typ Suppotsatatyp Suhal ornprund ype
also

P HP
pHP
on Speualype
Avay ompound ypes

Spedo types
4)Rea
ye.
OLntgenype
to
&sd ploying Ipteger Vales. Ttis Say
ngaehype
blonple 5
eiait.andtmt be n deurna
AintgeY muthove at least on
ond t Can be aithey positive or nagahi ve

Deule type
aapoy
Bomples tO.5
incduds thot lmpluoy
Oumb wth deto p
POnnC

hov beore
bctore ter dedrna palnt.

BnaanPe hak anbe


J d by
h woyp
Ye
mdean ype hy a tru
pvtsonded A and Pepresotsa4

omple

a nn Valas ons d in t d u b l e type


Rpvautdapraunttd a 0.0 ondru is Pepreannted
1.1

stoigtype
Thuu is haracen datetypeinP# Fhnacker
ha berpuented hen t Pepraented uSinq

otyp
lo0ecsn charat PhpSteng

hu
Spphp Sdot GHoru teinq
Vanas l igien bJa.

A TLke phe"
who

7
olp T phe
0
Followig ore the
nnsustd o
Vanou g hendi
Sthlen (si) ength o sing
hep('shing , ng3) +hs unchoo lompares Sinqa. ondthei
htoJower r q 4) onvert charactess ln irgato wur (ase

isReptnttd Shtopper(ing) Pptr (ase

Spa
orboth ends.t tzinq

henecteY OAULL NuLL is aSpecio dotatype PHP which can have

ted using y m Value NULL.

Averable type ULL s a Variabk hat has

Vau auignedto
p Stin iti
a Variable (scated whut a Val,
valu 6 NULL
aurtenaticollyaiianed a

Seirgin npidbSnvad
Vansble Can uo
+o O LL

Dample ph
S a i "

nu
Ti adh Vadump) putnul
hp
dumpi intoTmahm
abutVarbe. 1
Reaour in PH
i not an Achu datartype,
hSpecial-raauruype and
unckns
Stog f evtnu
roury ethrnol o PHP ,

objut type
we Con (reate
hp obju overttd proqsorncning yanguage
i
objuds in php. objeutsalwl ty and ths
and
ohjet
objet

(oompaunddata ype.

cas objut and objet a an otant dt


isatemp
cyasL php w on (rate numbey daiss ina

cass andwe an nude numbenabjeks n it. This

mtaint popertis and Acien. n as neud to


objet
Stortng wt apibalter
wn a neme Stast php
clasruit
bBLample.
(ode is wrten

here
Cap.lltte

delar
o
Ststernent
an
ohju Wau we nud to ut nc

a mjelau

obj ne Myulas,
php
Ocw stVas itstJIa
ben wth. we
lan dd
Deepak Properbes ynami ca
obj- age
Sob- maks 5
output.StJ chau dyut(
non Dupak
pe(so) 21

raysS'

Hras in php s type a


data taudture that alou
SHeve mulbple eamunt Sioat eabatype unden Single Vaiable a

a Jerent Vamables
h Savinq uwu r
h t Crecin
orv Very eata
=
Arey i a
Cedbro iearype Jennt and in
n
Php we Con inuede alameocs oed type togethon

Sing rroy
There r wo yays o ree Arrays in
php
u
Sing strut Array dt
value eiretly
Assiging
Aray
aroy10, 9 0,30, 40, 5o)
Ho empty ray
an alo be (realed uing he orr y (rnstrutt.

nchen is ustd to
banple' alY
arrar Crcate Array
ed type d bmeou in the Array
weCon have

ampk mst an4, 519, 9.23

There avt rypes oarrays i PHP

wh numerie nde

AuoLetive Ara named Keys.


Aras with
ntaining or mort Aray.
mulsdimerignel Ara Aray one

arrple lunt e Array.(v) lenqth


oCTpE ktm

array
kT", ".E", "Oulke),
echo
Coeuke)7
P:
4hdy
4/ htmb
xamplt2 <DocyeE html
chtmls
boal
-? phe
gb:kes "KTH "llee", "Dok.");
ho

opTk. kTM, a.ll.t Dke


hmds

30PERATDRS N PHP-
typy
O Arithmatc operato! Increment 8 derenert sperato
Asigamnt opesotora Ritwse opereto
Logicalical opriad

Eqalty 9peeckors
lornparision opetato
h a t are
ave
ased
acd
tha
Ahmaie operátons : fhere art 5 arithonatic Opestora
madhemahe operatots thy
are

to peorm

perstors Name blamp le


Ah
Subtatheo a-y
enuipbhvn

Divislum

w.dulus
Aiqnomnt oprators Jed by Sybl
ymbal"

oPyatov Na me bample
AssianmntE

Addien Auonent
subhacken
multiphakm
Divis'm

hodidu se7. 2

ogital optyator
Used To take decisio
Ustdoperovm deiien ie,
optratov Name blample
) AND
AND

NOT

Xor

Ptrator'

USed to lompare wo Valus


bprra Narneblample
Eaualto

ideh
(5ompavisioe opeato
L

bample
Inremnt dan perato r '

Decnment

Loment
Eomple i prormmunt

x4 potJotrnst

operator

A T
AD o 0 NOT

6larmple'
ovdh ot coleahm

Preidenu and Aocitivt


meanS

Smhas hiqh
, t » r p v u a t whieh
means
proy
hich bol has Voud pro
Probyand
bihst
dority
highus 1, . lwst
+

Deweat 7 ,4
oPtxatoY Aso tiekvihy

L
,,
, ,:
,

EXPRESSIONS IN PHP
lmportantbuilngblock
P#P,
prsins
are the mast
write s an bpreshon.
aWngst anything we

hal Vlu"
a"Anthing that
a

deined
Abpresion
amen
asgnent opesato le)
opesator
hat apptovs thetd
Aoythim
san ex pressim.
s an oresion

+ s an expression

opreui

wth + and operatos are Called


bpresin
ond tremen operaors. Bot pret and post
foemen G

oprotorsintannt
vaue st operandby 4, whee as
opetotrs dtrmnt b y 1
Intynent pos inreenent Pr deenun pst d
ehe
euho 4 4
cchox edo f etho
exo ,

ol
11
2

ave Sqhu choreters. Usng Regular.


phP Reglor tupressin

yu lao-d a phrtiular
hring, Reploaan Shing
pre Ssion
angther, eCan pliE Single Sing
into macy
pasts e.

operator ho reu optrand Ht one is gical


Jernary
pressten.
TRUE, TRUE, Seund óprvand. pressioni cvoluattd
otheruwi se 4hird one s evaluatedStaandsbm) ue he)

L1pp
cho
(ao) ?pass-
N PHP
SESSiOn HANDLING
Sorm
Apktaien, ynu openitd
with an

whn you
whn ou work si Knrwn
Kndun
enire prous
enre prous
ese
close ts
Ti s
hi s
and thenyou
ehanges
changes
when you Stert
aS Session
tkrrs
Knawshoyou are, B u t i n the teraet
t h e (oompater Cnd
w n you ho
+he tppliteton and doet'oot
docs'not
know
Vev
rServev
is One the wb
problem. the
wb
becauseHhe http ddrss
here

or whatE
do

State.
mentain
does o uSeY
u sY tbmne
orrnh
b y t o r 'ng
Solve this Probleern
Voviablet
Sesuten
daul Sesson
Sesson
mulbple peaes
uedoto
user
oses he browSeY. So,
are present ui use,
Variable
abrmstim abrut 0n Singye
Sesion Variables bol
and are
ja0bleto a paqas
Ssston. Stort anchon
Storbed wh
Setion a viady Stovtd
Sessorn
an thn cheeks
This
and non s St
S tatr
e te
d d hen Stont Seasirn.
then

he bginnng
pt at
Sesion.Starto
deshoyed bysnSeusi' desj
Sestion Can
and
n c t o n besnot cad an rqurnunts
p # P

unctin S l e Sesslo Vaviables


Stngle all

>
UoSkantKor utdoun&ta stlorn Variables
ome

Knnwn
Unst setkhon['tourter')

Stovt

wnet
php
Seuien durry

jntome&
Yeauest aresrrte
Seve
vcsuurland2

wiha
Scver.
Xcspmds
id
unique
Sesi n

requestsotan t h e
Sb cquant
use Seslon

a
uSer
members
Senven

Session id and qvu rsprmae.

Session hand l'ng

6 C o o KIES IN PHP
A looKies
it

utd idntty a
a
us.

A
A Goki o Serve embeds on
useY lampuiter

destrey the Samne


Sn00
a n d

Each
i used for tratkig. purpo[e.
t wil Send the
bruwer,
wh a

les (ormpurter zquejts


a (reate

(reat
and

and
Yc
Y ctrriie
evve
e

both
Can
CooKie r o yru
(ro kie Vajuej
th Stookest) mchen
A G reoted

path, dornain
Syotox Set Gke oam, yd, xpire,

cquirtd.'ell ther Parameters


Oame nettY
Paramettr
is

optimal

trp okiestheve ove three Stp


transpareotlySupport
PPH
ustrs
vodn detyinq Rehroing

ServenSeript Sends Stlooke o bendh. or exerpa


tation ounbey ch.
nam,

ntonaien nd
and oca
aca mach'nt
machino o Krhure sture
his
tores
ultY
wb Servet
Aest fo ws berver

hen
hen n t ime browstr Sendso
Sends a rquest
ServeY ond Servu
roketournatn t
hun Send hs usen.
u se.
Iormairos ldanhty
uses that

ample GKit.nome "u


value: "Toho"
Gokie
Sat Goks akit nere, okevalu,
+ (264o 3o)
ime()

3
Requ
ust +okiy

Sruusun
Seun
Raust
Rpme+ (ktu.
CONTROL STRUTURES IN PHP
aWous us bo lonttoV-c os o oiecahoo (ode nene ralW(odei
exuted Sequestal
Stavt
mel bon
-tSteps
FALSE
TRU E

Code exeuted

aede exe aion otnues


Lo nomal,

vu

here are wo ypes tol uchut in PH y

ona: bena Sttemens

Candiindtotemenes
Hennt aztions
art us
to p
battnents
Carn bona
ndbenak
Jrent nems. Tere art
bacd en

tatemunts phpthy are


O PStadument
e s e Staternent

Steh Statement.
Stottentot i t u .

o (ndib'en
ode
execates So Ymron'
age : 50
Synbaw londbirn)
qe) 30
bon
ihlmd
exkubed 30
han
lode to
be sue more
is
age
ecko our

unur aga it

m o r t h a n 30

T eSteknunt Co
l ode
de
anotheY
u e and
lonetm s
Some lode a
euees
ha nd ben P r o qam',

phe
Sptax.
uttd
be
(ode to
Crodto s tue',

eud
bo
ode(rnd:bon
be s
se

echotave a qrod ight


Statmeat

lon dtin to test,


i et
U i s Strnunt to Speihy ew

Crndtm s l e
2php
Systox.
3t0")

nd?tmitue uo omorning
(osebe exeu d echo

Ase ( t 2o)

d.t Lndt echo 0dAltroam

ceuttd
(odet be s true,
isfalse nd th

alse
n i g h E ! "

tho

re olu

SwHh Shtnent
Sectim
nu ltpe
choriae
Sith tttnn
Staternet
yntax' ProYan'.

SwHh ()
ed
tase Sanho)
(sde to be exeded #o:abra
break Case"red:
slour is rtd
echo your
nzlabela
(deto be eeuted brtak,
brrak
Cale "blue

is blue!".
echo" ur
tolour
Jefault braak

aho"
Nor is reen
you
rrok

i ot pru
echo yus l

tnd ti
Klonditiom

ole ed
Sbattnent
Stattrant
T r u e

Statemunbo)*

ENOF

statennt
(mdto tue.
nd:tm4 Statrnenk

Pse
mdsim ue |ndtinstaernanot

Aendton 33,tui ndin 3 tatment

fase

Suieh
Su ndin) Statment
ue
onibm A Sbaztemunt
break

ndtin 3 Strnat ' ,


brea

Statemernt o
lond:6on
breal

Defeult Default JLstunenb)-


ENo
octrod rops
ant the ame ok
okl tod
ode yu
when you wrte lode, J

lertatn nurnber d ms
to un ovey and oveY galn
9aln a

(de n na ip
SSo tstesd dadding Severa

we ult
rops
Same blak bde
ex.eeutehe
Noops aveed
is tue
aga'nand agan
aqaln oong a a
a a Cetadn (nd:Sm

ops
oops are cleukhd oto our typ
wlile
do hil

toreach
hoopt ute +he Llk 6de asleng
the Speuk lond:tiro k tru

while orndbin btru)


Eorpleh
(ode to be eutes

ecoTke unber is 2b
+
outp 1,2,3,,
dohile lope thrmugh a blodk odJ one, and hn epeass the
Nrvp as ng al dhe Spedke ndtion s tee
Prograr.
Sba phe
4
Comd:tmto be oceuted
ch T number i k
k:lendHn urue)), 44

th nmbe is

ede a Speike u n ber eney

fInurtet
taut unt; htment lnuter

d dach terabon
ode

lample Lph

echo He numbe h e number o

oupus

io
h elh
rmpa b k (ode

nan aTaY

sed o lovo
d ls
or aath Deop iagks onky on
thvgh eas KValue po'r in an ara

Sotox
1phe
tlors avrayred, qrun
aand valu blu ye0lrw)

Lode to be aetuttd cahgrlos ualui


ccho ya tbr

olp red
9ren
blu
Jelln

2 FILE HANDUNG TN PHP


an
imporban part tfany w Apphetien
Par
f e handing
4enttasktask we. need t open and proe a e

evera nchomt oreating Teadng up


=php hay tadlng p
ad handng In PHP Smilat as hardnq lone by ng
usn

any pwgramming anguaget : K


c.
N
Mrrna let Thove
work with
cormay
PHP has manyunckont to
uncdoos are

0pen()
ANe ope
s ded Jo open kJe. t takay
PHPopent)unhen
wo parameters .

J .on
unch node
which mode
ontainu name4be to be opened includes in

e ghal be opentd

blample' phP
4.openP.ut, ) ;
1
a Append
pde 14 read on at aad/ppend
w t nly
+ read write

(
(ontett daba are
ar

A e u opened ngfopent) he
ead ing Pzeadt .
bake Joo oqumot ogumtnte

parinkey to .

wweCan avso ule otherunchons :keabs ()


qebt) ead unthens fern le

Can be (Geatrd teut an be appended to an

New e ov

Cuistng l e utnguwnbet) -fanckun


an dput (o g unchions ustd to wrt daba

mo des4
W, t , wt , , t+

1)Sset ).
Flei Joed doset) -unchm. 1ts arq ument:
h nuds Jaed.

Jample Pole(A)
U.lak
Ad .lete he 5em one parameer Ateptd le
e nom Btample Untak( Hl)
JLeted t dhplay T2vE se t Pehu
.
UPLOADS:
9 HANDLING FILE
and ubpk l e through fw ne
PtHP a s you to upload Sle
Coede binary and and

ollort u upload
PHe upload feater
lan have the o
mortoe, yu

Ove e which yu havepleaded usng PHP

PHP oko Suppors


PHP
authentcakon ouck
Operatinuncion

PHP FILES
tains he ormakn l e, h
The PH qlbot.PLES
we Can qer noma, AHpe, kl.se
nLE
assocattd wh Rle.
temp 4le rame
ond erovs

Kle is ename,
i this example, we are a uming t e name

tere, o

MIMEHR
Innub mal extnsirn)
(multipupoje
Si3e
.FuEsna 3-,
tempor
FuESAoan p emot asodabed

FiEs Ae rae 'erro with the


let) knehen
move uoeaded
enoves he uloadl
>
uploadedJ. Weat nkon
ove.
Ronckm
uplonded-Klet)
move
a ne otabon.the Pos7

cheks uploade+hmuah
ftn
t onovthe l
aquc
post Raques

move- plod Stdg kena, Sig


desbnao

OR FORM CoNTROLS
CONTROLS
FORM
HANDUNG

. FORM
Jov S PUP
PHP.
use Jorms
(reate and use to use
eed to use
ww
e e
(an
we
oed
n th o r ,
the data present
To get
'are
bals.They Uedto (olleet
PHP Spero Germethod
nET mthod

Jorm daba
g-GET
em e PoST Method

PoST pooty methods


9etr» or
Send brm rguest
b n
nutoue f.GE|
needto use .GEl
we
Can e nethod w
wee

geb nched
toieve
esata
by sing
To Pab
btrnk
PHP Post ovn
ide ued to
Post uest S.mton hdt ove
orge amount daba Sueh a onds irnnge upload
ogin formS, tgishatn' orrms
The data passed hugh Post
post sequest not Visible on the
URL bwwseYSo t a Seured y lan Send arge
a t a hraug Postequest
in
ASimple oample to yeevee ata rorn post Post
uest
php

methedPost"
ethon Dab. php

tat ame 2 nme b


Name input typ
email
t«t
Er inp.t ype
inpu type Submit aleSuhit
d
wlom
Daba php
php
sho $Postam"

addres is
yuY mai

-php
echoPoST "
N a m e! T S a i

Em nsai3o5dolm

Sa
wkior Sai

is
ou &nal addreu
nsi 3osqnil (on

PHP net method

Cnet Pequ
he detauls om Pegus. [he
his
vis:ble o
Palsed mugh qet auut s

he URL bruwser So tib ootSerure.


y u nud o
Send t d amaunt d data hrmugh Ru
bod
fov
action
Dta php mdthod " ge
ame: inpt typetut am ame cb
Emai nput type "tat nam aema: Lbr
lnput type : Subnt dn "Snit

NameSai
Dataph / .
[email protected]
L body
wlcorne
Lphp welem Sal
echo g e t "ame ourena acdress is

oSa 205@no. o

uy emal address is

php
eho $qet

Lbody
htmly
11. LisTIN DIRECTORIES
furckont thab o ous
PHH Prnvides Support
a ofdreetory
and
and is
dredoriu
etsieve ifomatian abou
(ontents

Vaiow directory unetions are


given belns
given beln

uocbom
descxiption

th ere change (urrot reetry

hraokc)
Wove Current worKing distory
ese die
gecwde Reburo
open drutory handle
open dirt

Yad aty
an
ectory
Yewnddit l) Rese divutony hand le.

Reurns an
Instante t he direeony has

Thedirecto Junchons
ave part t PHP Co
No Insta llatirn ssquired to use these funchons

theopn on d
Yead are the wo imporant
inportant
prs
Funthons that are
lomoony usedh. Qstion
ontents aira
Paramete
open eir Syata open dir pah, Gotest);

sanots path Coptienol


Spece Uedto denote
behaviaut dt tscaro
directoy

Read dhe
Synta'. enddi handle)
Oprtion oX paramete
handle xeiruru
t deroter drty
hich b opened wHh opendi

Syntax ae dir (handu),


optiona parameter

Tnotes airetoy hande run


hleh opened t h openchd)

ScOPE AND LIFETME OF VARIABLFS


IN PHP
Stope aVanables:
Variablet are d uo typ
hoee
afunchen
variable Varlables declared intide
Voca
nutside

oal vaviables
3) Statbc here in the
oalVariader Can be acessed anyw
obalVariabkt ln afuncion,
it mast
Jo acceu
Prog Yar uSing
derkeraben suncbie
be darlared th a qobl
qlobal Kyword. othorwle the Vayialle aets aS

oca Vaiable

i e n Sun) Stabe
y u want

obsa,4 Nornalwuna uncden


Varable sdea s lamplebd t d
Tunthon uwe ule U t Vayiables
aNobal koyword a r elbd Houww
Sorndras we wan b
Sun()
Notl varble noT h
be delatd. T do this
we use Stbe Kaywar

1
ctime of Vaxiable
in php-unctianbgin when
e 1: me acalVaviable
ends when e Punebeo execuhon
Variable i a t t d and e
anetion ese
afunebieneie eeuchon
is ter temnatio
tevo inates

Value d laal Variabi. lost


the
tatic ocal vaiable
in ndon bealn
The lte toe, a
the Vaviable is t t dinetion
when
nata
And ends shen
the Scipt uhon terrmi

Varable is Spehed unSate kapud


T Stabe Docal
DATABASE SQL as axetexentel
GTO
CONNECTING
3.
Can be dounlonded
is open Sourte edatabase podutt and
MYSQL
feorhe internet.
in whiehhe xetords avé
databas«
MyQL a id able the
he table +he data
bkableLle. T
Stored in an nbty adeJ a dabbae

e rousand (amns. we
Can
an 9uerya
ara nqed
arra nqt in
a equestr a question
Parbcula itovmabon. uery it
to yctaieve
or database.
and t
hes
anguage
PHP is a
Server s:de Striphirg traturd
Culstomedrstura
lustoid
ot
P a e s 'oith

(reate dynamik pegés


an ab:hyto
Jsing PHP MyQL (an
lan
uley siendly and etevacive wth Sites
be (roald
Both Courte technoloqies a t uok
PH and 1y sQL ave
open
and E
handiohand to aeate gih intesnet Appltations

kighSeccure.
PHP-MySQL are Stable technolagies and have Cross plattom
+hese
Capab Hence he w oplicakon daveloped uing
tehnolagiet berome portable.

Sine HTML is embedded wth PHP, then s o need to


Sinte
wit Sepavate (ode for we- Sceiptig
PHP ho gtatong Support or devloping e-(onmerte
applitatons iq he echnoloqg ies Such a EComnerte
Drupal and Sood
heroost wbsites beng
Popalar
developed using PHP
nd Hy SqL echlages are
nd

Otaehok
()wordpres
iikt peda
ahvo
s usedto establih (onnecbon
7Mys_ (onnett)Junekon a

behween PH and MySQL

tuntions to My SQL
ust
to (cate daba baSt 'fancion
for eors .in (ommandS mysaeor()

mySeleub.dk
Selecing dababase
stng Databest

Jables prttt nside he databate


art

lst_ nckon b used o uplay baLl


uncken
roys t.Le
Present tasase Can a o use 9uery we lan

Peto Varios operationsKe

O (reabe a kable

Lseting data int the bablk


altering table
D . l q tble

You might also like