WT Notes 1st & 2nd Unit
WT Notes 1st & 2nd Unit
weome +o -lp>
Zo # WT Lab ~Ip>
Zlbody>
Zi hireh>
MHTML desedbec structure of webpages eG SOL e
Rut eiowente are oui ding “blocks Of HTML Pogec.
KHTML elements are represented by Lage.
* Stople ATML Document
Z| Doe Type html >coe
; 5 Tee ez thie
HE Bold eagsi= qe ‘e wed to specify hold content in ag Wtrol fie
(Or) ese StH.
Suntaxi= aby statement —-—
ge Teotic taq.= TE & wed te write the content in, teable Pony
_ 4le>
Syntany = Ziv Statement -- — Z/i>
under tine agi ued to set the content Underline
Syntoxrtr 4a> Saas ee LU
| sro Lent) Hagi= Pt is ured te cet the cmaitt font size
t ef the content
) Syntos = t= Zematt> tewe —--2 ltmall>
pete Text Taq. Fe te uted t Ye present deleted Telt-
Tt process Abe Kexrt content
give > statement —
PrEtCOME
= 2lenite>
Sos ee
Ca
| Bamchor taqs= Te tei used te Unk ove page te another page
Syrest- 2a wep = “inkname'> statement 4/4>
ents visit google cet Poy better experience
Syrtoxi=
| 2pp Msit 2a bret =" het ps flaw qeogte * com
Boogepaqe 4/a> webpage doy better Xperience
oS Static Sco}
Saas Pet= When A tompleted OY executed atl of Ftg
vee AYE
5 oe dere tod, however cometrred we wan® 4
Neg not to be deleted we need it for a further job
Local
+o do this we we the static Keyword when you frict
dectare the Vorialle,
<2 php
-function mm
fant
} g1s35
echo’ $i
|
six
| roy tnd;
| 204 funy;
rv) 4
4 fan 0;
a
Vartables wilt have
| Eee tine
| Xhe thfoynation
catted+ el}
are Voriabie ts Loca) tr the block.
tatemnents,= Echo ¥ print s
to the scree:
* 4
soe function ne colted be
Poe toe. functor oes
at
ae contain trom we as
catements|
| pHe echo and print $
d to Output doko
are UAL
Syntax? ;
Void | echo (."starg garqetseqe
lor)
Pans exh echo " stvh
wotd tot print ( “set of axquments\) vert echo " st feral,
WEE ay:
Con)
vy
pent a aes
vi
Notes = echo * pris, cto te cers! G2 be Used with oF voitho
aes echo , e-hot);
print pint);
sy Beolor = axray ("rect" “green” | N yellow!) -
(dex can be a.utaned automat catty (starts from lol)
(oe) e.- 42phP ;
Beoioy carey "red,
Wace", “yetious').
qeen', “y ;
A) phe wdex can be assigned manual
| Beoloy Coy atrea ls
Scolor Tj = green.
Beoloy C2} = swe tioust;
: echo "2 \fee color ¢color(o7
4 colevE!} and se
: UT?
Dssctokivel loop [4raverse rough
| =
E
kndexed Array
= TOF 5
Heoior Sayroy trea", Ngreen", yen),
Se Seen & Eeoror) ;
Box L tao, $14 4%) ttt)
echo '! Stole, CHIE;
a
A i. i Or lobe}
Agsotiative— Php attows you to ascotiative ee ¥
with each arr element in php using => Syobor: St
each element “cs wepresented by a Looe: (an) named Key.
Mere are 2 WOYe to create ascociative array
Pectarakion, 497 php
eig- fear = away ('c\" => “amu, “el => “kia’, tens “pal.
f
tov) Ss echo oy fret car ts $cax Ler)
Poe Caja "emul ? 5
HOt [eK] = Nifaw.
Seow ("es") = "Taal
Loop through Ayrra1-_
| ForvC $i=o; ¢ tecount (tor). Ste)
echo " scar C $i N\nt;
f£ we se By each toop g
for €90h ( $cay ag % > $e vane)
Key Ivawwe
ValueAATG HC ceepuemte of Characters We * Matowota®
mnetions + Wing fWntlons one Wed to mantputate the string =
Soe
Yeturns
Ving fF tne sting » syntant tat strlen (6 sty)
ED ial a rword.eua(fsta)
q :
> AWESLS AHL suring - 4
Mb OF Speeic Love within teting
ScCOMWats qyen veri t owucare
um ven Stitng to UPPLICOME
epLaes the CpEAtIC CnOrGUets OF stag
Makes the flit Choracte OF string (D Lppucase
Chouatter of coch wad. Mm a string F< codtvented HPpacate
enh
1F (Stapos Cwond” syenowcld"))
2 Ody ¥ caanch Hh Guccerspeull”
else
nt LE st¥); Q (ser POC ysentd” ayuw ward")
rs ‘ Starch 16 succes gully
Ato DUCoos . =
Wee and sesston fh pip. -f coorie 4c ied “1D (dent
Cur yy erolbeds 09 the
— — —
A Usexs Hepple fe a cma! tre that the ser”
Maer comp urer: ack 4sene/ tne same Computer
ae wlth a browser tt uot! Send the cooKle Information,
ity Pttp we can eveate and retvelve cookie Valuer
A cookie tc a piece of data frony O webcite thot ts
stored’ within a web browser that A we
OA taley Lirne cookies ave citest Side
requecta
bpeite CON Tetrive
es. Mot one
boo On A LOcol computty wWhevert eecctona ave SEMEN Side
Nex Het crores wiet Mformation+
By browser
Create coofie with
cookies exeated at server <
ene wer, eter wequcste +o ‘he Sev
wort vequest and connie can be Tec’
jteb Sewer
yy
de ond slered tn cliest Sete tee
vey cookie * embeddec
sod akwhe server Side,
tuieb browsert
wegted , cent and received at server
evued beforedrtro .
[funetfon 4s Uredl 40 get conte with
cookies can be ¢
Nore3= php cookie murt &
poe setéookie() method
were wesponse .
Once cookie %e cet tH can accecs It oy $_ cookie supergie
Moxioldle :
Bae too! Set cookie (leoorteNlame ptcookte vatue')»
Sar ' Seat Ake
sercookie ('coo¢ie Name’, 'coortevatue , setenel)-f-
6ex 160)
Lit expires fy ahour
€3600)aph pl
UNS ee cook le (' vser))
WeooKie ts get"
}
me cookfe set the expiration dota fo Port
=— , 2
re. wl lee dereted-
: vor *
4g pace Snforenattod: Bron
6 42 anpthet zermpovars uot We wer Clocey He lomws
s ‘| —€¥.
gesston rechaique. Ss widely wacd in elhopping ‘wrlestte
fae. need VO ENS amd | Pass y infermatton dyer One
pop et Eorm 3) pase. cane
4 iS Ja. globe! Voxtalre. gtored on the eexvey- Gach
unique td worfch fx ued Ho vettve
Ktoni> php ceseion i wed
3 assigned ew
tues +» sesstory fnave. the caparotttyy
ee senmepane -to toowle, Seseion vatue fs cle teted
Dwbenthe browser, ty close. TH We want to
pexmanently en yo chowd Stove then
40 tore! targe
‘ereate< unique user id -for each ue ae
User anal avo ‘
pamaees poe tonfuct blo muttiple brnwsers,tous}bey
et}.— NO ven) ie Aes AMupo6 oa
Bcc te book sure >= bOOK 7 Yay *