You are on page 1of 543

Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

PHP HTML M RECOMMENDED BOOKS

CSS Tutorials o
(http://php- d (https://www.amazon.com/dp/0596006306?

html.net/tuto e tag=wwwconsultguc-
20&camp=0&creative=0&linkCode=as1&crea

rials/) l tiveASIN=0596006306&adid=00XCK63C4RK

Tutorials, Resources and V TZW0YMRD1&)


Snippets
i (https://www.amazon.com/dp/0596157134?

e
Tutorials, Resources and Snippets tag=wwwconsultguc-
20&camp=0&creative=0&linkCode=as1&crea
w tiveASIN=0596157134&adid=1A7XA9K48T7

TAGS C E13V1TVP6&)

api (http://php- o (http://www.amazon.com/gp/product/05968

n
html.net/tutorials/tag/api/) cache
02447?ie=UTF8&tag=wwwconsultguc-
(http://php- 20&linkCode=xm2&camp=1789&creativeASI
html.net/tutorials/tag/cache/) cache t N=0596802447)
r
mechanism (http://php-

html.net/tutorials/tag/cache-
(https://www.amazon.com/dp/0975841963?
mechanism/) Date & Time (http://php- o tag=wwwconsultguc-

ll
html.net/tutorials/tag/date-time/)
20&camp=0&creative=0&linkCode=as1&crea
howto tiveASIN=0975841963&adid=05JGA3MGB9J

(http://php- e KTCJ4TCCJ&)

html.net/tutori r
als/tag/howto/ (
) HTML5 (http://php- CATEGORIES

M
http://php-html.net/tutorials/model-view-controller-in-php/ Page 1 of 543
Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

V
html.net/tutorials/tag/html5/) local ! Api (Http://Php-Html.net/Tutorials/Category/Api/)
storage (http://php- ! Arrays (Http://Php-
html.net/tutorials/tag/local-storage/) C Html.net/Tutorials/Category/Arrays/)

Mail (http://php-

html.net/tutorials/tag/mail/) Model View


) ! Classes (Http://Php-
Html.net/Tutorials/Category/Classes/)

Controller (http://php- i ! Date & Time (Http://Php-


Html.net/Tutorials/Category/Date-Time/)
html.net/tutorials/tag/model-view-

controller/) MVC (http://php-


n ! Howto (Http://Php-

html.net/tutorials/tag/mvc/) parsing P Html.net/Tutorials/Category/Howto/)

! HTML5 (Http://Php-
(http://php-

html.net/tutorials/tag/parsing/) Patterns
H Html.net/Tutorials/Category/Html5/)

(http://php- P ! Mail (Http://Php-


Html.net/Tutorials/Category/Mail/)
html.net/tutorials/tag/patterns/) php By ! Parsing (Http://Php-
(http://php- ad Html.net/Tutorials/Category/Parsing/)

html.net/tutorials/ta mi ! Patterns (Http://Php-


g/php/) Recection (http://php- n Html.net/Tutorials/Category/Patterns/)

html.net/tutorials/tag/recection/) (h ! Recection (Http://Php-


Html.net/Tutorials/Category/Classes/Recection/)
scraper (http://php- tt
html.net/tutorials/tag/scraper/) p:/ ! Source Control (Http://Php-
Html.net/Tutorials/Category/Source-Control/)
scrapper (http://php- /p
html.net/tutorials/tag/scrapper/) hp ! Uncategorized (Http://Php-
Html.net/Tutorials/Category/Uncategorized/)
scrapping (http://php- -
! Util (Http://Php-Html.net/Tutorials/Category/Util/)
html.net/tutorials/tag/scrapping/) shell ht
(http://php-html.net/tutorials/tag/shell/) ml
svn (http://php- .n
html.net/tutorials/tag/svn/) tutorial et/
(http://php- tu
html.net/tutorials/tag/tutorial/) tor
tutorials (http://php- ial
html.net/tutorials/ta s/
g/tutorials/) url (http://php- au
html.net/tutorials/tag/url/) usefull th

http://php-html.net/tutorials/model-view-controller-in-php/ Page 2 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

(http://php- or
html.net/tutorials/tag/usefull/) Util /a
(http://php-html.net/tutorials/tag/util/) d
web storage (http://php- mi
html.net/tutorials/tag/web-storage/) n/
)
in
Pa
RECENT POSTS
tte
" HTML5 Local Storage – rn
Complete Guide (http://php-
s
html.net/tutorials/html5-local-
storage-guide/) (h
tt
" How to write a simple scraper in
PHP without Regex (http://php- p:/
html.net/tutorials/how-to-write- /p
a-simple-scrapper-in-php-
hp
without-regex/)
-
" Creating a Simple PHP Cache
ht
Script (http://php-
html.net/tutorials/creating-a- ml
simple-php-cache-script/) .n
" Php Class to Retrieve Alexa et/
Rank (http://php- tu
html.net/tutorials/php-class-to-
tor
retrieve-alexa-rank/)
ial
" Model View Controller(MVC) in
PHP (http://php- s/
html.net/tutorials/model-view- ca
controller-in-php/) te
go
ry

RECENT COMMENTS
/p
att
# Gandu bhaai on Model View
Controller(MVC) in PHP
er
(http://php-

http://php-html.net/tutorials/model-view-controller-in-php/ Page 3 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

html.net/tutorials/model-view- ns
controller-in-php/comment-
/)
page-3/#comment-10334)
%
# Shawnii on How to write a
$
simple scraper in PHP without
Regex (http://php- Au
html.net/tutorials/how-to-write- gus
a-simple-scrapper-in-php-
t
without-regex/comment-page-
10,
1/#comment-10322)
20
# Kirit Patel on Model View
09
Controller(MVC) in PHP
(http://php- (htt
html.net/tutorials/model-view- p://
controller-in-php/comment-
ph
page-3/#comment-9218)
p-
# chatwithstrangers on How to ht
handle URLs in PHP (http://php-
ml.
html.net/tutorials/how-to-
handle-urls-in-php/comment- net
page-1/#comment-8832) /tut

# Mrunal on Model View ori


Controller(MVC) in PHP als
(http://php-
/m
html.net/tutorials/model-view-
ode
controller-in-php/comment-
page-3/#comment-8012) l-

vie

w-

con
BLOGROLL trol

ler-
PHP HTML Resources
in-
(http://php-html.net/)
ph

p/

#
14

http://php-html.net/tutorials/model-view-controller-in-php/ Page 4 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

Co

me

nts

(htt

p://

ph
&
p-

ht

ml.

net

/tut

ori

als

/m

ode

l-

vie

w-

con

trol

ler-

in-

ph

p/#

co

me

nts

Th

http://php-html.net/tutorials/model-view-controller-in-php/ Page 5 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

e
m
od
el
vi
e
w
co
nt
rol
ler
pa
tte
rn
is
th
e
m
os
t
us
ed

http://php-html.net/tutorials/model-view-controller-in-php/ Page 6 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

pa
tte
rn
for
to
da
y’s
w
orl
d
w
eb
ap
pli
ca
tio
ns
. It
ha
s
be
en
us
ed
for
th
e
fir
st
ti
m
e
in
S

http://php-html.net/tutorials/model-view-controller-in-php/ Page 7 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

m
all
tal
k
an
d
th
en
ad
op
te
d
an
d
po
pu
lar
iz
ed
by
Ja
va
.
At
pr
es
en
t
th
er
e
ar
e
m

http://php-html.net/tutorials/model-view-controller-in-php/ Page 8 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

or
e
th
an
a
do
ze
n
P
H
P
w
eb
fra
m
e
w
or
ks
ba
se
d
on
M
V
C
pa
tte
rn.

De
sp
ite
th

http://php-html.net/tutorials/model-view-controller-in-php/ Page 9 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

e
fa
ct
th
at
th
e
M
V
C
pa
tte
rn
is
ve
ry
po
pu
lar
in
P
H
P,
is
ha
rd
to
fin
d
a
pr
op
er
tu

http://php-html.net/tutorials/model-view-controller-in-php/ Page 10 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

tor
ial
ac
co
m
pa
ni
ed
by
a
si
m
pl
e
so
ur
ce
co
de
ex
a
m
pl
e.
Th
at
is
th
e
pu
rp
os
e
of

http://php-html.net/tutorials/model-view-controller-in-php/ Page 11 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

th
is
tu
tor
ial
.

T
h
e
M
V
C
p
a
t
t
e
r
n
s
e
p
a
r
a
t
e
s
a
n
a
p
p

http://php-html.net/tutorials/model-view-controller-in-php/ Page 12 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

l
i
c
a
t
i
o
n
i
n
3
m
o
d
u
l
e
s
:
M
o
d
e
l
,
V
i
e
w
a
n
d
C
o

http://php-html.net/tutorials/model-view-controller-in-php/ Page 13 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

n
t
r
o
l
l
e
r
:

T
h
e
m
o
d
e
l
i
s
r
e
s
p
o
n
s
i
b
l
e
t
o

http://php-html.net/tutorials/model-view-controller-in-php/ Page 14 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

m
a
n
a
g
e
t
h
e
d
a
t
a
;
i
t
s
t
o
r
e
s
a
n
d
r
e
t
r
i
e
v
e
s

http://php-html.net/tutorials/model-view-controller-in-php/ Page 15 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

e
n
t
i
t
i
e
s
u
s
e
d
b
y
a
n
a
p
p
l
i
c
a
t
i
o
n
,
u
s
u
a
l
l

http://php-html.net/tutorials/model-view-controller-in-php/ Page 16 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

y
f
r
o
m
a
d
a
t
a
b
a
s
e
,
a
n
d
c
o
n
t
a
i
n
s
t
h
e
l
o
g
i
c

http://php-html.net/tutorials/model-view-controller-in-php/ Page 17 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

i
m
p
l
e
m
e
n
t
e
d
b
y
t
h
e
a
p
p
l
i
c
a
t
i
o
n
.

T
h
e
v
i

http://php-html.net/tutorials/model-view-controller-in-php/ Page 18 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

e
w
(
p
r
e
s
e
n
t
a
t
i
o
n
)
i
s
r
e
s
p
o
n
s
i
b
l
e
t
o
d
i
s

http://php-html.net/tutorials/model-view-controller-in-php/ Page 19 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

p
l
a
y
t
h
e
d
a
t
a
p
r
o
v
i
d
e
d
b
y
t
h
e
m
o
d
e
l
i
n
a
s
p

http://php-html.net/tutorials/model-view-controller-in-php/ Page 20 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

e
c
i
f
i
c
f
o
r
m
a
t
.
I
t
h
a
s
a
s
i
m
i
l
a
r
u
s
a
g
e
w
i
t

http://php-html.net/tutorials/model-view-controller-in-php/ Page 21 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

h
t
h
e
t
e
m
p
l
a
t
e
m
o
d
u
l
e
s
p
r
e
s
e
n
t
i
n
s
o
m
e
p
o

http://php-html.net/tutorials/model-view-controller-in-php/ Page 22 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

p
u
l
a
r
w
e
b
a
p
p
l
i
c
a
t
i
o
n
s
,
l
i
k
e
w
o
r
d
p
r
e
s
s

http://php-html.net/tutorials/model-view-controller-in-php/ Page 23 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

,
j
o
o
m
l
a
,

T
h
e
c
o
n
t
r
o
l
l
e
r
h
a
n
d
l
e
s
t
h
e
m

http://php-html.net/tutorials/model-view-controller-in-php/ Page 24 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

o
d
e
l
a
n
d
v
i
e
w
l
a
y
e
r
s
t
o
w
o
r
k
t
o
g
e
t
h
e
r
.
T
h

http://php-html.net/tutorials/model-view-controller-in-php/ Page 25 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

e
c
o
n
t
r
o
l
l
e
r
r
e
c
e
i
v
e
s
a
r
e
q
u
e
s
t
f
r
o
m
t
h
e

http://php-html.net/tutorials/model-view-controller-in-php/ Page 26 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

c
l
i
e
n
t
,
i
n
v
o
k
e
s
t
h
e
m
o
d
e
l
t
o
p
e
r
f
o
r
m
t
h
e

http://php-html.net/tutorials/model-view-controller-in-php/ Page 27 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

r
e
q
u
e
s
t
e
d
o
p
e
r
a
t
i
o
n
s
a
n
d
s
e
n
d
s
t
h
e
d
a
t
a

http://php-html.net/tutorials/model-view-controller-in-php/ Page 28 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

t
o
t
h
e
V
i
e
w
.
T
h
e
v
i
e
w
f
o
r
m
a
t
s
t
h
e
d
a
t
a
t
o
b

http://php-html.net/tutorials/model-view-controller-in-php/ Page 29 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

e
p
r
e
s
e
n
t
e
d
t
o
t
h
e
u
s
e
r
,
i
n
a
w
e
b
a
p
p
l
i
c
a
t

http://php-html.net/tutorials/model-view-controller-in-php/ Page 30 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

i
o
n
a
s
a
n
h
t
m
l
o
u
t
p
u
t
.

Th
e
ab
ov
e
fig
ur
e
co
nt
ai
ns
th
e
M

http://php-html.net/tutorials/model-view-controller-in-php/ Page 31 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

V
C
Co
lla
bo
rat
io
n
Di
ag
ra
m,
w
he
re
th
e
lin
ks
an
d
de
pe
nd
en
ci
es
be
tw
ee
n
fig
ur
es

http://php-html.net/tutorials/model-view-controller-in-php/ Page 32 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

ca
n
be
ob
se
rv
ed
:

Ou
r
sh
or
t
ph
p
ex
a
m
pl
e
ha
sa
si
m
pl
e
str
uc
tu
re,
pu

http://php-html.net/tutorials/model-view-controller-in-php/ Page 33 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

tti
ng
ea
ch
M
V
C
m
od
ul
e
in
on
e
fol
de
r:

C
o
n
tr
o
ll
e
r
Th
e
co

http://php-html.net/tutorials/model-view-controller-in-php/ Page 34 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

nt
rol
ler
is
th
e
fir
st
th
in
g
w
hi
ch
ta
ke
sa
re
qu
es
t,
pa
rs
es
it,
ini
tia
liz
es
an
d
in
vo
ke

http://php-html.net/tutorials/model-view-controller-in-php/ Page 35 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

th
e
m
od
el
an
d
ta
ke
s
th
e
m
od
el
re
sp
on
se
an
d
se
nd
s
it
to
th
e
pr
es
en
tat
io
n

http://php-html.net/tutorials/model-view-controller-in-php/ Page 36 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

la
ye
r.
It’
s
pr
ac
tic
all
y
th
e
lia
nt
be
tw
ee
n
th
e
M
od
el
an
d
th
e
Vi
e
w,
a
s
m
all

http://php-html.net/tutorials/model-view-controller-in-php/ Page 37 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

fra
m
e
w
or
k
w
he
re
M
od
el
an
d
Vi
e
w
ar
e
pl
ug
ge
d
in.
In
ou
r
na
iv
e
ph
p
im
pl

http://php-html.net/tutorials/model-view-controller-in-php/ Page 38 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

e
m
en
tat
io
n
th
e
co
nt
rol
ler
is
im
pl
e
m
en
te
d
by
on
ly
on
e
cl
as
s,
na
m
ed
un
ex
pe

http://php-html.net/tutorials/model-view-controller-in-php/ Page 39 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

ct
ed
ly
co
nt
rol
ler
.
Th
e
ap
pli
ca
tio
n
en
tr
y
po
in
t
wi
ll
be
in
de
x.
ph
p.
Th
e
in
de
x

http://php-html.net/tutorials/model-view-controller-in-php/ Page 40 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

ph
p
fil
e
wi
ll
de
le
ga
te
all
th
e
re
qu
es
ts
to
th
e
co
nt
rol
ler
:

http://php-html.net/tutorials/model-view-controller-in-php/ Page 41 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

01.

02.

http://php-html.net/tutorials/model-view-controller-in-php/ Page 42 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

03.

04.

05.

http://php-html.net/tutorials/model-view-controller-in-php/ Page 43 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

Ou
r
Co
nt
rol
ler
cl
as
s
ha
s
on
ly
on
e
fu
nc
tio
n
an
d
th
e

http://php-html.net/tutorials/model-view-controller-in-php/ Page 44 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

co
ns
tr
uc
tor
.
Th
e
co
ns
tr
uc
tor
in
st
an
tia
te
sa
m
od
el
cl
as
s
an
d
w
he
n
a
re
qu
es

http://php-html.net/tutorials/model-view-controller-in-php/ Page 45 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

t
is
do
ne
,
th
e
co
nt
rol
ler
de
ci
de
s
w
hi
ch
da
ta
is
re
qu
ire
d
fro
m
th
e
m
od
el.
Th
en

http://php-html.net/tutorials/model-view-controller-in-php/ Page 46 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

it
ca
lls
th
e
m
od
el
cl
as
s
to
ret
rie
ve
th
e
da
ta.
Af
ter
th
at
it
ca
lls
th
e
co
rr
es
po
nd
in

http://php-html.net/tutorials/model-view-controller-in-php/ Page 47 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

g
pa
ss
in
g
th
e
da
ta
co
mi
ng
fro
m
th
e
m
od
el.
Th
e
co
de
is
ex
tre
m
el
y
si
m
pl
e.
No

http://php-html.net/tutorials/model-view-controller-in-php/ Page 48 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

te
th
at
th
e
co
nt
rol
ler
do
es
no
t
kn
o
w
an
yt
hi
ng
ab
ou
t
th
e
da
ta
ba
se
or
ab
ou
t
ho

http://php-html.net/tutorials/model-view-controller-in-php/ Page 49 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

w
th
e
pa
ge
is
ge
ne
rat
ed
.

01.

http://php-html.net/tutorials/model-view-controller-in-php/ Page 50 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

02.

03.

04.

http://php-html.net/tutorials/model-view-controller-in-php/ Page 51 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

05.

06.

07.

08.

http://php-html.net/tutorials/model-view-controller-in-php/ Page 52 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

09.

10.

11.

http://php-html.net/tutorials/model-view-controller-in-php/ Page 53 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

12.

13.

http://php-html.net/tutorials/model-view-controller-in-php/ Page 54 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

14.

15.

http://php-html.net/tutorials/model-view-controller-in-php/ Page 55 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

16.

http://php-html.net/tutorials/model-view-controller-in-php/ Page 56 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

17.

http://php-html.net/tutorials/model-view-controller-in-php/ Page 57 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

18.

19.

http://php-html.net/tutorials/model-view-controller-in-php/ Page 58 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

20.

21.

22.

http://php-html.net/tutorials/model-view-controller-in-php/ Page 59 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

23.

http://php-html.net/tutorials/model-view-controller-in-php/ Page 60 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

24.

25.

http://php-html.net/tutorials/model-view-controller-in-php/ Page 61 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

26.

In
th
e
fol
lo
wi
ng
M
V
C
Se
qu
en
ce
Di
ag
ra
m
yo
u
ca
n
ob
se
rv
e

http://php-html.net/tutorials/model-view-controller-in-php/ Page 62 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

th
e
flo
w
du
ri
ng
a
ht
tp
re
qu
es
t:

M
o
d
e
l
a
n
d
E
n
ti
t
y
C
l
http://php-html.net/tutorials/model-view-controller-in-php/ Page 63 of 543
Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

a
s
s
e
s
T
h
e
M
o
d
e
l
r
e
p
r
e
s
e
n
t
s
t
h
e
d
a
t
a
a
n

http://php-html.net/tutorials/model-view-controller-in-php/ Page 64 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

d
t
h
e
l
o
g
i
c
o
f
a
n
a
p
p
l
i
c
a
t
i
o
n
,
w
h
a
t
m
a
n
y
c

http://php-html.net/tutorials/model-view-controller-in-php/ Page 65 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

a
l
l
s
b
u
s
i
n
e
s
s
l
o
g
i
c
.
U
s
u
a
l
l
y
,
i
t

s
r
e
s
p

http://php-html.net/tutorials/model-view-controller-in-php/ Page 66 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

o
n
s
i
b
l
e
f
o
r
:

s
t
o
r
i
n
g
,
d
e
l
e
t
i
n
g
,
u
p
d
a

http://php-html.net/tutorials/model-view-controller-in-php/ Page 67 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

t
i
n
g
t
h
e
a
p
p
l
i
c
a
t
i
o
n
d
a
t
a
.
G
e
n
e
r
a
l
l
y
i
t

http://php-html.net/tutorials/model-view-controller-in-php/ Page 68 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

i
n
c
l
u
d
e
s
t
h
e
d
a
t
a
b
a
s
e
o
p
e
r
a
t
i
o
n
s
,
b
u
t
i

http://php-html.net/tutorials/model-view-controller-in-php/ Page 69 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

m
p
l
e
m
e
n
t
i
n
g
t
h
e
s
a
m
e
o
p
e
r
a
t
i
o
n
s
i
n
v
o
k
i

http://php-html.net/tutorials/model-view-controller-in-php/ Page 70 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

n
g
e
x
t
e
r
n
a
l
w
e
b
s
e
r
v
i
c
e
s
o
r
A
P
I
s
i
s
n
o
t
a
n

http://php-html.net/tutorials/model-view-controller-in-php/ Page 71 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

u
n
u
s
u
a
l
a
t
a
l
l
.

e
n
c
a
p
s
u
l
a
t
i
n
g
t
h
e
a
p
p
l

http://php-html.net/tutorials/model-view-controller-in-php/ Page 72 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

i
c
a
t
i
o
n
l
o
g
i
c
.
T
h
i
s
i
s
t
h
e
l
a
y
e
r
t
h
a
t
s
h
o

http://php-html.net/tutorials/model-view-controller-in-php/ Page 73 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

u
l
d
i
m
p
l
e
m
e
n
t
a
l
l
t
h
e
l
o
g
i
c
o
f
t
h
e
a
p
p
l
i
c

http://php-html.net/tutorials/model-view-controller-in-php/ Page 74 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

a
t
i
o
n
.
T
h
e
m
o
s
t
c
o
m
m
o
n
m
i
s
t
a
k
e
s
a
r
e
t
o
i
m

http://php-html.net/tutorials/model-view-controller-in-php/ Page 75 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

p
l
e
m
e
n
t
a
p
p
l
i
c
a
t
i
o
n
l
o
g
i
c
o
p
e
r
a
t
i
o
n
s
i

http://php-html.net/tutorials/model-view-controller-in-php/ Page 76 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

n
s
i
d
e
t
h
e
c
o
n
t
r
o
l
l
e
r
o
r
t
h
e
v
i
e
w
(
p
r
e
s
e
n

http://php-html.net/tutorials/model-view-controller-in-php/ Page 77 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

t
a
t
i
o
n
)
l
a
y
e
r
.

In
ou
r
ex
a
m
pl
e
th
e
m
od
el
is
re
pr
es
en
te
d

http://php-html.net/tutorials/model-view-controller-in-php/ Page 78 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

by
2
cl
as
se
s:
th
e
“M
od
el”
cl
as
s
an
d
a
“B
oo
k”
cl
as
s.
Th
e
m
od
el
do
es
n’t
ne
ed
an

http://php-html.net/tutorials/model-view-controller-in-php/ Page 79 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

y
ot
he
r
pr
es
en
tat
io
n.
Th
e
“B
oo
k”
cl
as
s
is
an
en
tit
y
cl
as
s.
Th
is
cl
as
s
sh
ou
ld

http://php-html.net/tutorials/model-view-controller-in-php/ Page 80 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

be
ex
po
se
d
to
th
e
Vi
e
w
la
ye
r
an
d
re
pr
es
en
ts
th
e
for
m
at
ex
po
rte
d
by
th
e
M

http://php-html.net/tutorials/model-view-controller-in-php/ Page 81 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

od
el
vi
e
w.
In
a
go
od
im
pl
e
m
en
tat
io
n
of
th
e
M
V
C
pa
tte
rn
on
ly
en
tit
y
cl
as
se

http://php-html.net/tutorials/model-view-controller-in-php/ Page 82 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

s
sh
ou
ld
be
ex
po
se
d
by
th
e
m
od
el
an
d
th
ey
sh
ou
ld
no
t
en
ca
ps
ul
at
e
an
y
bu
si

http://php-html.net/tutorials/model-view-controller-in-php/ Page 83 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

ne
ss
lo
gi
c.
Th
eir
so
lel
y
pu
rp
os
e
is
to
ke
ep
da
ta.
De
pe
nd
in
g
on
im
pl
e
m
en
tat
io
n

http://php-html.net/tutorials/model-view-controller-in-php/ Page 84 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

En
tit
y
ob
je
ct
s
ca
n
be
re
pl
ac
ed
by
x
ml
or
js
on
ch
un
k
of
da
ta.
In
th
e
ab
ov
e
sn
ip

http://php-html.net/tutorials/model-view-controller-in-php/ Page 85 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

pe
t
yo
u
ca
n
no
tic
e
ho
w
M
od
el
is
ret
ur
ni
ng
a
sp
ec
ifi
c
bo
ok
,
or
a
lis
t
of
all
av

http://php-html.net/tutorials/model-view-controller-in-php/ Page 86 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

ail
ab
le
bo
ok
s:

01.

http://php-html.net/tutorials/model-view-controller-in-php/ Page 87 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

02.

03.

04.

http://php-html.net/tutorials/model-view-controller-in-php/ Page 88 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

05.

06.

http://php-html.net/tutorials/model-view-controller-in-php/ Page 89 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

07.

08.

http://php-html.net/tutorials/model-view-controller-in-php/ Page 90 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

http://php-html.net/tutorials/model-view-controller-in-php/ Page 91 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

09.

http://php-html.net/tutorials/model-view-controller-in-php/ Page 92 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

10.

http://php-html.net/tutorials/model-view-controller-in-php/ Page 93 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

11.

12.

http://php-html.net/tutorials/model-view-controller-in-php/ Page 94 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

13.

14.

15.

16.

http://php-html.net/tutorials/model-view-controller-in-php/ Page 95 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

http://php-html.net/tutorials/model-view-controller-in-php/ Page 96 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

17.

http://php-html.net/tutorials/model-view-controller-in-php/ Page 97 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

18.

http://php-html.net/tutorials/model-view-controller-in-php/ Page 98 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

19.

http://php-html.net/tutorials/model-view-controller-in-php/ Page 99 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

20.

21.

22.

23.

In
ou
r
ex
a
m
pl
e

http://php-html.net/tutorials/model-view-controller-in-php/ Page 100 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

th
e
m
od
el
la
ye
r
in
cl
ud
es
th
e
Bo
ok
cl
as
s.
In
a
re
al
sc
en
ari
o,
th
e
m
od
el
wi
ll

http://php-html.net/tutorials/model-view-controller-in-php/ Page 101 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

in
cl
ud
e
all
th
e
en
tit
ie
s
an
d
th
e
cl
as
se
s
to
pe
rsi
st
da
ta
in
to
th
e
da
ta
ba
se,
an

http://php-html.net/tutorials/model-view-controller-in-php/ Page 102 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

d
th
e
cl
as
se
s
en
ca
ps
ul
ati
ng
th
e
bu
si
ne
ss
lo
gi
c.

http://php-html.net/tutorials/model-view-controller-in-php/ Page 103 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

01.

02.

03.

http://php-html.net/tutorials/model-view-controller-in-php/ Page 104 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

04.

05.

06.

http://php-html.net/tutorials/model-view-controller-in-php/ Page 105 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

07.

08.

http://php-html.net/tutorials/model-view-controller-in-php/ Page 106 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

09.

10.

http://php-html.net/tutorials/model-view-controller-in-php/ Page 107 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

11.

12.

http://php-html.net/tutorials/model-view-controller-in-php/ Page 108 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

V
i
e
w
(
P
r
e
s
e
n
t
a
ti
o
n
)
Th
e
vi
e
w(
pr
es
en
tat
io
n
la

http://php-html.net/tutorials/model-view-controller-in-php/ Page 109 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

ye
r)i
s
re
sp
on
si
bl
e
for
for
m
ati
ng
th
e
da
ta
re
ce
iv
ed
fro
m
th
e
m
od
el
in
a
for
m
ac

http://php-html.net/tutorials/model-view-controller-in-php/ Page 110 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

ce
ss
ibl
e
to
th
e
us
er.
Th
e
da
ta
ca
n
co
m
e
in
dif
fer
en
t
for
m
at
s
fro
m
th
e
m
od
el:

http://php-html.net/tutorials/model-view-controller-in-php/ Page 111 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

si
m
pl
e
ob
je
ct
s(
so
m
eti
m
es
ca
lle
d
Va
lu
e
Ob
je
ct
s),
x
ml
str
uc
tu
re
s,
js
on
,

http://php-html.net/tutorials/model-view-controller-in-php/ Page 112 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

Th
e
vi
e
w
sh
ou
ld
no
t
be
co
nf
us
ed
to
th
e
te
m
pl
at
e
m
ec
ha
ni
s
m
so
m
eti
m
es

http://php-html.net/tutorials/model-view-controller-in-php/ Page 113 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

th
ey
w
or
k
in
th
e
sa
m
e
m
an
ne
r
an
d
ad
dr
es
s
si
mi
lar
is
su
es.
Bo
th
wi
ll
re
du
ce

http://php-html.net/tutorials/model-view-controller-in-php/ Page 114 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

th
e
de
pe
nd
en
cy
of
th
e
pr
es
en
tat
io
n
la
ye
r
of
fro
m
re
st
of
th
e
sy
st
e
m
an
d
se

http://php-html.net/tutorials/model-view-controller-in-php/ Page 115 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

pa
rat
es
th
e
pr
es
en
tat
io
n
el
e
m
en
ts(
ht
ml
)
fro
m
th
e
co
de
.
Th
e
co
nt
rol
ler
de
le

http://php-html.net/tutorials/model-view-controller-in-php/ Page 116 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

ga
te
s
th
e
da
ta
fro
m
th
e
m
od
el
to
a
sp
ec
ifi
c
vi
e
w
el
e
m
en
t,
us
ua
lly
as
so
ci

http://php-html.net/tutorials/model-view-controller-in-php/ Page 117 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

at
ed
to
th
e
m
ai
n
en
tit
y
in
th
e
m
od
el.
Fo
r
ex
a
m
pl
e
th
e
op
er
ati
on
“di
sp
la
y

http://php-html.net/tutorials/model-view-controller-in-php/ Page 118 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

ac
co
un
t”
wi
ll
be
as
so
ci
at
ed
to
a
“di
sp
la
y
ac
co
un
t”
vi
e
w.
Th
e
vi
e
w
la
ye
r
ca

http://php-html.net/tutorials/model-view-controller-in-php/ Page 119 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

n
us
e
a
te
m
pl
at
e
sy
st
e
m
to
re
nd
er
th
e
ht
ml
pa
ge
s.
Th
e
te
m
pl
at
e
m
ec
ha

http://php-html.net/tutorials/model-view-controller-in-php/ Page 120 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

ni
s
m
ca
n
re
us
e
sp
ec
ifi
c
pa
rts
of
th
e
pa
ge:
he
ad
er,
m
en
us,
fo
ot
er,
lis
ts
an
d
ta
bl

http://php-html.net/tutorials/model-view-controller-in-php/ Page 121 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

es,
….
Sp
ea
ki
ng
in
th
e
co
nt
ex
t
of
th
e
M
V
C
pa
tte
rn

In
ou
r
ex
a
m
pl
e
th
e
vi

http://php-html.net/tutorials/model-view-controller-in-php/ Page 122 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

e
w
co
nt
ai
ns
on
ly
2
fil
es
on
e
for
di
sp
la
yi
ng
on
e
bo
ok
an
d
th
e
ot
he
r
on
e
for
di

http://php-html.net/tutorials/model-view-controller-in-php/ Page 123 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

sp
la
yi
ng
a
lis
t
of
bo
ok
s.

vi
e
w
bo
ok
.p
hp

01.

http://php-html.net/tutorials/model-view-controller-in-php/ Page 124 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

02.

03.

04.

05.

06.

07.

08.

http://php-html.net/tutorials/model-view-controller-in-php/ Page 125 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

09.

http://php-html.net/tutorials/model-view-controller-in-php/ Page 126 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

10.

http://php-html.net/tutorials/model-view-controller-in-php/ Page 127 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

11.

12.

13.

14.

15.

http://php-html.net/tutorials/model-view-controller-in-php/ Page 128 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

bo
ok
lis
t.p
hp

01.

02.

http://php-html.net/tutorials/model-view-controller-in-php/ Page 129 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

03.

04.

05.

06.

07.

http://php-html.net/tutorials/model-view-controller-in-php/ Page 130 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

http://php-html.net/tutorials/model-view-controller-in-php/ Page 131 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

08.

09.

10.

http://php-html.net/tutorials/model-view-controller-in-php/ Page 132 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

11.

12.

http://php-html.net/tutorials/model-view-controller-in-php/ Page 133 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

http://php-html.net/tutorials/model-view-controller-in-php/ Page 134 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

http://php-html.net/tutorials/model-view-controller-in-php/ Page 135 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

13.

14.

15.

16.

17.

18.

http://php-html.net/tutorials/model-view-controller-in-php/ Page 136 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

19.

Th
e
ab
ov
e
ex
a
m
pl
e
is
a
si
m
pli
fie
d
im
pl
e
m
en

http://php-html.net/tutorials/model-view-controller-in-php/ Page 137 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

tat
io
n
in
P
H
P.
M
os
t
of
th
e
P
H
P
w
eb
fra
m
e
w
or
ks
ba
se
d
on
M
V
C
ha
ve
si

http://php-html.net/tutorials/model-view-controller-in-php/ Page 138 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

mi
lar
im
pl
e
m
en
tat
io
ns
,
in
a
m
uc
h
be
tte
r
sh
ap
e.
Ho
w
ev
er,
th
e
po
ss
ibi
lit
y
of

http://php-html.net/tutorials/model-view-controller-in-php/ Page 139 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

M
V
C
pa
tte
rn
ar
e
en
dl
es
s.
Fo
r
ex
a
m
pl
e
dif
fer
en
t
la
ye
rs
ca
n
be
im
pl
e
m
en

http://php-html.net/tutorials/model-view-controller-in-php/ Page 140 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

te
d
in
dif
fer
en
t
la
ng
ua
ge
s
or
di
str
ib
ut
ed
on
dif
fer
en
t
m
ac
hi
ne
s.
AJ
A
X
ap
pli
ca

http://php-html.net/tutorials/model-view-controller-in-php/ Page 141 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

tio
ns
ca
n
im
pl
e
m
en
ts
th
e
Vi
e
w
la
ye
r
di
re
ctl
y
in
Ja
va
sc
ri
pt
in
th
e
br
o
w

http://php-html.net/tutorials/model-view-controller-in-php/ Page 142 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

se
r,
in
vo
ki
ng
JS
O
N
se
rvi
ce
s.
Th
e
co
nt
rol
ler
ca
n
be
pa
rti
all
y
im
pl
e
m
en
te
d
on

http://php-html.net/tutorials/model-view-controller-in-php/ Page 143 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

cli
en
t,
pa
rti
all
y
on
se
rv
er

T
h
i
s
p
o
s
t
s
h
o
u
l
d
n
o
t
b
e
e
n

http://php-html.net/tutorials/model-view-controller-in-php/ Page 144 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

d
e
d
b
e
f
o
r
e
e
n
u
m
e
r
a
t
i
n
g
t
h
e
a
d
v
a
n
t
a
g
e
s
o

http://php-html.net/tutorials/model-view-controller-in-php/ Page 145 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

f
M
o
d
e
l
V
i
e
w
C
o
n
t
r
o
l
l
e
r
p
a
t
t
e
r
n
:

t
h
e
M

http://php-html.net/tutorials/model-view-controller-in-php/ Page 146 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

o
d
e
l
a
n
d
V
i
e
w
a
r
e
s
e
p
a
r
a
t
e
d
,
m
a
k
i
n
g
t
h
e
a

http://php-html.net/tutorials/model-view-controller-in-php/ Page 147 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

p
p
l
i
c
a
t
i
o
n
m
o
r
e
f
l
e
x
i
b
l
e
.

t
h
e
M
o
d
e
l
a
n

http://php-html.net/tutorials/model-view-controller-in-php/ Page 148 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

d
v
i
e
w
c
a
n
b
e
c
h
a
n
g
e
d
s
e
p
a
r
a
t
e
l
y
,
o
r
r
e
p
l

http://php-html.net/tutorials/model-view-controller-in-php/ Page 149 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

a
c
e
d
.
F
o
r
e
x
a
m
p
l
e
a
w
e
b
a
p
p
l
i
c
a
t
i
o
n
c
a
n
b

http://php-html.net/tutorials/model-view-controller-in-php/ Page 150 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

e
t
r
a
n
s
f
o
r
m
e
d
i
n
a
s
m
a
r
t
c
l
i
e
n
t
a
p
p
l
i
c
a
t

http://php-html.net/tutorials/model-view-controller-in-php/ Page 151 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

i
o
n
j
u
s
t
b
y
w
r
i
t
i
n
g
a
n
e
w
V
i
e
w
m
o
d
u
l
e
,
o
r
a

http://php-html.net/tutorials/model-view-controller-in-php/ Page 152 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

n
a
p
p
l
i
c
a
t
i
o
n
c
a
n
u
s
e
w
e
b
s
e
r
v
i
c
e
s
i
n
t
h
e

http://php-html.net/tutorials/model-view-controller-in-php/ Page 153 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

b
a
c
k
e
n
d
i
n
s
t
e
a
d
o
f
a
d
a
t
a
b
a
s
e
,
j
u
s
t
r
e
p
l

http://php-html.net/tutorials/model-view-controller-in-php/ Page 154 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

a
c
i
n
g
t
h
e
m
o
d
e
l
m
o
d
u
l
e
.

e
a
c
h
m
o
d
u
l
e
c
a
n

http://php-html.net/tutorials/model-view-controller-in-php/ Page 155 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

b
e
t
e
s
t
e
d
a
n
d
d
e
b
u
g
g
e
d
s
e
p
a
r
a
t
e
l
y
.

Th
e
fil

http://php-html.net/tutorials/model-view-controller-in-php/ Page 156 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

es
ar
e
av
ail
ab
le
for
do
w
nl
oa
d
as
a
zi
p
fro
m
ht
tp:
//s
ou
rc
ef
or
ge
.n
et/
pr
oj
ec
ts/
m

http://php-html.net/tutorials/model-view-controller-in-php/ Page 157 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

vc
-
ph
p/
fil
es
/
m
vc.
zi
p/
do
w
nl
oa
d
(h
tt
p:/
/s
ou
rc
ef
or
ge
.n
et/
pr
oj
ec
ts/
m
vc
-

http://php-html.net/tutorials/model-view-controller-in-php/ Page 158 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

ph
p/
fil
es
/
m
vc.
zi
p/
do
w
nl
oa
d)

D
i
d

http://php-html.net/tutorials/model-view-controller-in-php/ Page 159 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

y
o
u
e
n
j
o
y
t
h
i
s
t
u
t
o
r
i
a
l
?
B
e
s
u
r
e
t
o
s
u
b
s
c

http://php-html.net/tutorials/model-view-controller-in-php/ Page 160 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

r
i
b
e
t
o
t
h
e
o
u
r
R
S
S
f
e
e
d
(
h
t
t
p
:
/
/
p
h
p
-
h
t
m

http://php-html.net/tutorials/model-view-controller-in-php/ Page 161 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

l
.
n
e
t
/
t
u
t
o
r
i
a
l
s
/
f
e
e
d
/
)
n
o
t
t
o
m
i
s
s
o
u
r

http://php-html.net/tutorials/model-view-controller-in-php/ Page 162 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

n
e
w
t
u
t
o
r
i
a
l
s
!
... or
make it
popular
on

TA
G
S
Model View Controller

(http://php-

html.net/tutorials/tag/model-

view-controller/)

MVC (http://php-

html.net/tutorials/tag/mvc/)

Patterns (http://php-

html.net/tutorials/tag/patterns/)

http://php-html.net/tutorials/model-view-controller-in-php/ Page 163 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

('

Php
How
Class
to handle
to Retrieve
URLsAlexa
in PHP
Rank
( (
hh
tttt
pp
:/:/
/ /
pp
hh
pp
- -
hh
t t
mm
l. l.
nn
ee
t t
/ /
t t
uu
t t
oo
ri ri
aa
l l
ss
/ /
hp
oh
wp
- -

http://php-html.net/tutorials/model-view-controller-in-php/ Page 164 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

t c
o l
- a
hs
as
n -
d t
l o
e -
- r
ue
rl tr
s i
- e
i v
ne
- -
pa
h l
pe
/ x
) a
-
r
a
n
k
/
)

http://php-html.net/tutorials/model-view-controller-in-php/ Page 165 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

14
8
CO
M
ME
NT
S

C
o
m
m
e
n
t
n
a
v
i
g
a
t
http://php-html.net/tutorials/model-view-controller-in-php/ Page 166 of 543
Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

i
o
n

Ol
de
r
Co
m
m
en
ts
(ht
tp:
//p
hp
-
ht
ml
.n
et/
tut
ori
als
/m
od
el-
vie
w-
co
ntr

http://php-html.net/tutorials/model-view-controller-in-php/ Page 167 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

oll
er-
in-
ph
p/
co
m
m
en
t-
pa
ge
-
2/
#c
o
m
m
en
ts)

b
h
a
r
a
d
w
a
j
.
b
.
g

http://php-html.net/tutorials/model-view-controller-in-php/ Page 168 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

(
h
t
t
p
:
/
/
w
w
w
.
w
e
b
m
o
n
s
t
e
r
s
o
l
u
t
i
o
n
s
.
c
o

http://php-html.net/tutorials/model-view-controller-in-php/ Page 169 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

m
)
)

http://php-html.net/tutorials/model-view-controller-in-php/ Page 170 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

http://php-html.net/tutorials/model-view-controller-in-php/ Page 171 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

http://php-html.net/tutorials/model-view-controller-in-php/ Page 172 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

S
i
m
p
l
e
.
N
o
b
o
d
y
e
x
p
l
a
i
n
e
d
m
e

http://php-html.net/tutorials/model-view-controller-in-php/ Page 173 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

l
i
k
e
t
h
i
s
.
T
h
a
t
c
l
e
a
r
s
o
f
f
m
y
m
i
n
d
a
n
d
g
e
t

http://php-html.net/tutorials/model-view-controller-in-php/ Page 174 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

o
n
w
i
t
h
M
V
C
s
t
r
u
c
t
u
r
e
.

I
w
i
l
l
t
o
w
r
i
t
e
m
y

http://php-html.net/tutorials/model-view-controller-in-php/ Page 175 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

a
p
p
s
n
e
x
t
t
i
m
e
a
r
o
u
n
d
.
T
h
a
n
k
Y
o
u
.

N
.

http://php-html.net/tutorials/model-view-controller-in-php/ Page 176 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

V
i
j
a
y
a
)

http://php-html.net/tutorials/model-view-controller-in-php/ Page 177 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

http://php-html.net/tutorials/model-view-controller-in-php/ Page 178 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

http://php-html.net/tutorials/model-view-controller-in-php/ Page 179 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

n
i
c
e
a
n
d
e
a
s
y
t
o
u
n
d
e
r
s
t

http://php-html.net/tutorials/model-view-controller-in-php/ Page 180 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

a
n
d




.
.

V
i
k
a
s
h
)

http://php-html.net/tutorials/model-view-controller-in-php/ Page 181 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

http://php-html.net/tutorials/model-view-controller-in-php/ Page 182 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

http://php-html.net/tutorials/model-view-controller-in-php/ Page 183 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

s
u
c
h
a
v

http://php-html.net/tutorials/model-view-controller-in-php/ Page 184 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

e
r
y
g
o
o
d
e
x
p
l
a
n
a
t
i
o
n



i
m
r
a
n
(
h
t

http://php-html.net/tutorials/model-view-controller-in-php/ Page 185 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

t
p
:
/
/
w
w
w
.
s
e
t
h
i
p
l
a
z
a
.
c
o
m
)
)

http://php-html.net/tutorials/model-view-controller-in-php/ Page 186 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

http://php-html.net/tutorials/model-view-controller-in-php/ Page 187 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

http://php-html.net/tutorials/model-view-controller-in-php/ Page 188 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

http://php-html.net/tutorials/model-view-controller-in-php/ Page 189 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

N
i
c
e
l
i
t
t
l
e
p
r
i
m
e
r
h
e
r
e
,
t
h
a
n
k
s
f
o
r
t
h
i
s

http://php-html.net/tutorials/model-view-controller-in-php/ Page 190 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

T
h
a
n
k
s

i
m
r
a
n
(
h
t
t
p
:
/
/
w
w
w
.
s
e
t
h
i
p
l

http://php-html.net/tutorials/model-view-controller-in-php/ Page 191 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

a
z
a
.
c
o
m
)
)

http://php-html.net/tutorials/model-view-controller-in-php/ Page 192 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

http://php-html.net/tutorials/model-view-controller-in-php/ Page 193 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

http://php-html.net/tutorials/model-view-controller-in-php/ Page 194 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

v
e
r
y
n
i
c
e
b
r
i
e
f
a
n
d

http://php-html.net/tutorials/model-view-controller-in-php/ Page 195 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

c
o
m
p
a
c
t
o
v
e
r
v
i
e
w
t
o
j
u
m
p
i
n
,
T
h
a
n
k
s

http://php-html.net/tutorials/model-view-controller-in-php/ Page 196 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

J
u
a
n
C
a
r
l
o
s
(
h
t
t
p
:
/
/
w
w
w
.
m
u
s
q
u
x
.
c
o
m

http://php-html.net/tutorials/model-view-controller-in-php/ Page 197 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

)
)

http://php-html.net/tutorials/model-view-controller-in-php/ Page 198 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

http://php-html.net/tutorials/model-view-controller-in-php/ Page 199 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

http://php-html.net/tutorials/model-view-controller-in-php/ Page 200 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

G
r
a
c
i
a
s
p
o
r
e
l
a
p
o
r
t
e

m
u
y
b
u

http://php-html.net/tutorials/model-view-controller-in-php/ Page 201 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

e
n
t
u
t
o
r
i
a
l

S
h
m
e
d
S
h
a
a
b
a
n
E
l
g
e
n
d
y
)

http://php-html.net/tutorials/model-view-controller-in-php/ Page 202 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

http://php-html.net/tutorials/model-view-controller-in-php/ Page 203 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

http://php-html.net/tutorials/model-view-controller-in-php/ Page 204 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

http://php-html.net/tutorials/model-view-controller-in-php/ Page 205 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

r
e
a
l
l
y
i
s
v
e
r
y
g
o
o
d
t
h
a
n
k
s
v
e
r
y
m

http://php-html.net/tutorials/model-view-controller-in-php/ Page 206 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

u
c
h

J
a
y
B
)

http://php-html.net/tutorials/model-view-controller-in-php/ Page 207 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

http://php-html.net/tutorials/model-view-controller-in-php/ Page 208 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

http://php-html.net/tutorials/model-view-controller-in-php/ Page 209 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

T
h
a
n
k
s
f
o
r
t
h
i
s
,
r
e
a

http://php-html.net/tutorials/model-view-controller-in-php/ Page 210 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

l
l
y
u
s
e
f
u
l
p
r
i
m
e
r
t
o
M
V
C
!

S
a
c
h
i
n
(
h
t

http://php-html.net/tutorials/model-view-controller-in-php/ Page 211 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

t
p
:
/
/
s
a
c
h
i
n
m
a
g
a
r
.
c
o
m
)
)

http://php-html.net/tutorials/model-view-controller-in-php/ Page 212 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

http://php-html.net/tutorials/model-view-controller-in-php/ Page 213 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

http://php-html.net/tutorials/model-view-controller-in-php/ Page 214 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

V
e
r
y
N

http://php-html.net/tutorials/model-view-controller-in-php/ Page 215 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

i
c
e
D
e
s
c
r
i
p
t
i
o
n

t
h
a
n
k
s
!
!
!

E
d
w
i
n
)

http://php-html.net/tutorials/model-view-controller-in-php/ Page 216 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

http://php-html.net/tutorials/model-view-controller-in-php/ Page 217 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

http://php-html.net/tutorials/model-view-controller-in-php/ Page 218 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

http://php-html.net/tutorials/model-view-controller-in-php/ Page 219 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

T
h
a
n
k
y
o
u
v
e
r
y
m
u
c
h
f
o
r
t
h
i
s
t
u
t
o

http://php-html.net/tutorials/model-view-controller-in-php/ Page 220 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

r
i
a
l
.
I
w
a
s
s
e
a
r
c
h
i
n
g
f
o
r
a
g
o
o
d
,
c
l
e
a
n
,
s

http://php-html.net/tutorials/model-view-controller-in-php/ Page 221 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

m
a
l
l
t
u
t
o
r
i
a
l
f
o
r
o
v
e
r
2
d
a
y
s
n
o
w
.
T
h
i
s
i
s

http://php-html.net/tutorials/model-view-controller-in-php/ Page 222 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

t
h
e
o
n
l
y
o
n
e
I
u
n
d
e
r
s
t
a
n
d
,
a
n
d
I
r
e
a
l
l
y
l
e

http://php-html.net/tutorials/model-view-controller-in-php/ Page 223 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

a
r
n
e
d
h
o
w
i
t
w
o
r
k
s
n
o
w
!

T
h
a
n
k
y
o
u
v
e
r
y
m
u

http://php-html.net/tutorials/model-view-controller-in-php/ Page 224 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

c
h
.
I
w
i
l
l
r
e
c
o
m
m
e
n
d
t
h
i
s
p
a
g
e
/
t
u
t
o
r
i
a
l

http://php-html.net/tutorials/model-view-controller-in-php/ Page 225 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

f
o
r
e
v
e
r
y
o
n
e
w
h
o
w
a
n
t
s
t
o
l
e
a
r
n
M
V
C
.

http://php-html.net/tutorials/model-view-controller-in-php/ Page 226 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

h
i
)

http://php-html.net/tutorials/model-view-controller-in-php/ Page 227 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

http://php-html.net/tutorials/model-view-controller-in-php/ Page 228 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

http://php-html.net/tutorials/model-view-controller-in-php/ Page 229 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

T
h
a
n
k
s
u
v
e
r
y
m
u
c
h
!

M
a
t
t

http://php-html.net/tutorials/model-view-controller-in-php/ Page 230 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

(
h
t
t
p
:
/
/
m
b
r
o
w
n
n
y
c
.
w
o
r
d
p
r
e
s
s
.
c
o
m
)
)

http://php-html.net/tutorials/model-view-controller-in-php/ Page 231 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

http://php-html.net/tutorials/model-view-controller-in-php/ Page 232 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

http://php-html.net/tutorials/model-view-controller-in-php/ Page 233 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

http://php-html.net/tutorials/model-view-controller-in-php/ Page 234 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

S
e
v
e
r
a
l
y
e
a
r
s
l
a
t
e
r
,
a
n
d
t
h
e
r
e
a
r
e

http://php-html.net/tutorials/model-view-controller-in-php/ Page 235 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

a
l
w
a
y
s
b
e
g
i
n
n
e
r
s
w
h
o
d
o
n

t
h
a
v
e
t
i
m
e
t
o
r

http://php-html.net/tutorials/model-view-controller-in-php/ Page 236 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

e
a
d
b
o
o
k
s
a
b
o
u
t
P
H
P
a
n
d
M
V
C
.
T
h
a
n
k
s
f
o
r
t
h

http://php-html.net/tutorials/model-view-controller-in-php/ Page 237 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

e
a
r
t
i
c
l
e
.

s
u
z
u
)

http://php-html.net/tutorials/model-view-controller-in-php/ Page 238 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

http://php-html.net/tutorials/model-view-controller-in-php/ Page 239 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

http://php-html.net/tutorials/model-view-controller-in-php/ Page 240 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

T
h
a
n
k
s
,
i
t

http://php-html.net/tutorials/model-view-controller-in-php/ Page 241 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM


s
v
e
r
y
c
l
e
a
r
l
y
.

B
e
n
)

http://php-html.net/tutorials/model-view-controller-in-php/ Page 242 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

http://php-html.net/tutorials/model-view-controller-in-php/ Page 243 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

http://php-html.net/tutorials/model-view-controller-in-php/ Page 244 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

G
r
e
a

http://php-html.net/tutorials/model-view-controller-in-php/ Page 245 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

t
t
u
t
o
r
i
a
l
t
h
a
n
k
s
,
f
i
n
d
i
n
g
i
n
f
o
o
n
M
V
C
i
n

http://php-html.net/tutorials/model-view-controller-in-php/ Page 246 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

P
H
P
i
s
d
i
f
f
i
c
u
l
t
,
I
a
m
s
e
e
i
n
g
a
l
l
o
t
o
f
M
V
C

http://php-html.net/tutorials/model-view-controller-in-php/ Page 247 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

P
H
P
b
o
o
k
s
b
e
i
n
g
p
u
b
l
i
s
h
e
d
r
e
c
e
n
t
l
y
w
h
i
c

http://php-html.net/tutorials/model-view-controller-in-php/ Page 248 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

h
i
s
n
i
c
e
.
I
a
m
s
u
r
p
r
i
s
e
d
M
V
C
i
s
n
o
t
m
o
r
e
w
i

http://php-html.net/tutorials/model-view-controller-in-php/ Page 249 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

d
e
l
y
i
m
p
l
e
m
e
n
t
e
d
u
s
i
n
g
P
H
P
c
o
n
s
i
d
e
r
i
n
g

http://php-html.net/tutorials/model-view-controller-in-php/ Page 250 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

i
t
i
s
r
e
a
l
l
y
w
a
s
t
h
e
f
i
r
s
t
m
a
i
n
s
t
r
e
a
m
w
e
b

http://php-html.net/tutorials/model-view-controller-in-php/ Page 251 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

d
e
v
e
l
o
p
m
e
n
t
l
a
n
g
u
a
g
e
.

E
d
d
y
)

http://php-html.net/tutorials/model-view-controller-in-php/ Page 252 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

http://php-html.net/tutorials/model-view-controller-in-php/ Page 253 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

http://php-html.net/tutorials/model-view-controller-in-php/ Page 254 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

http://php-html.net/tutorials/model-view-controller-in-php/ Page 255 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

Q
u
i
t
e
o
l
d
p
o
s
t
b
u
t
s
t
i
l
l
a
p
p
l
i
e
s
t
o
o
u
r

http://php-html.net/tutorials/model-view-controller-in-php/ Page 256 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM


m
o
d
e
r
n
d
a
y
s

.
I
t

s
r
e
a
l
l
y
s
t
r
a
i
g
h
t
f
o
r

http://php-html.net/tutorials/model-view-controller-in-php/ Page 257 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

w
a
r
d
!
!
!
V
e
r
y
n
i
c
e
a
r
t
i
c
l
e
.

W
e
l
l
,
j
u
s
t
t

http://php-html.net/tutorials/model-view-controller-in-php/ Page 258 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

o
a
d
d
m
y
c
o
n
t
r
i
b
u
t
i
o
n
,
a
s
I
h
a
v
e
r
e
a
d
a
l
o
t

http://php-html.net/tutorials/model-view-controller-in-php/ Page 259 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

o
f
p
o
s
t
s
a
b
o
u
t
M
V
C
,
I
g
o
t
a
l
i
t
t
l
e
b
i
t
c
o
n
f

http://php-html.net/tutorials/model-view-controller-in-php/ Page 260 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

u
s
e
d
w
h
e
n
I
s
a
w
t
h
e
f
i
r
s
t
p
i
c
t
u
r
e
i
n
t
h
i
s
p

http://php-html.net/tutorials/model-view-controller-in-php/ Page 261 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

o
s
t
.
D
o
n

t
y
o
u
t
h
i
n
k
i
t
h
a
s
m
o
r
e
t
o
d
o
w
i
t
h

http://php-html.net/tutorials/model-view-controller-in-php/ Page 262 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

t
h
e
M
V
P
(
M
o
d
e
l
V
i
e
w
P
r
e
s
e
n
t
e
r
)
p
a
t
t
e
r
n
i

http://php-html.net/tutorials/model-view-controller-in-php/ Page 263 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

n
s
t
e
a
d
o
f
M
V
C
?

I

m
a
s
k
i
n
g
i
t
b
e
c
a
u
s
e
a
s
f

http://php-html.net/tutorials/model-view-controller-in-php/ Page 264 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

a
r
a
s
I
k
n
o
w
,
i
n
*
*
*
M
V
C
*
*
*
t
h
e
v
i
e
w
t
a
l
k
s
t

http://php-html.net/tutorials/model-view-controller-in-php/ Page 265 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

o
t
h
e
m
o
d
e
l
w
i
t
h
o
u
t
h
a
v
i
n
g
t
o
g
o
t
h
r
o
u
g
h
C

http://php-html.net/tutorials/model-view-controller-in-php/ Page 266 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

o
n
t
r
o
l
l
e
r
.

A
n
y
w
a
y
s
,
I
b
e
l
i
e
v
e
M
V
P
i
s
j
u

http://php-html.net/tutorials/model-view-controller-in-php/ Page 267 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

s
t
a
n
o
t
h
e
r
f
l
a
v
o
r
o
f
M
V
C
a
n
d
n
o
m
a
t
t
e
r
w
h
e

http://php-html.net/tutorials/model-view-controller-in-php/ Page 268 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

t
h
e
r
I

m
c
o
r
r
e
c
t
o
r
w
r
o
n
g
y
o
u
r
p
o
s
t
i
s
s
t
i

http://php-html.net/tutorials/model-view-controller-in-php/ Page 269 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

l
l
v
e
r
y
u
s
e
f
u
l
.

C
h
e
e
r
s
!

A
d
n
a
n
(
h
t
t
p

http://php-html.net/tutorials/model-view-controller-in-php/ Page 270 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

:
/
/
w
w
w
.
p
a
k
g
e
e
k
.
c
o
m
)
)

http://php-html.net/tutorials/model-view-controller-in-php/ Page 271 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

http://php-html.net/tutorials/model-view-controller-in-php/ Page 272 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

http://php-html.net/tutorials/model-view-controller-in-php/ Page 273 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

v
e
r
y
w
e

http://php-html.net/tutorials/model-view-controller-in-php/ Page 274 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

l
l
w
r
i
t
t
e
n
a
r
t
i
c
l
e
a
b
o
u
t
M
V
C
b
a
s
i
c
s
.
N
o
w

http://php-html.net/tutorials/model-view-controller-in-php/ Page 275 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

I
c
a
n
s
a
y
I
k
n
o
w
h
o
w
t
o
w
o
r
k
i
n
M
V
C
p
a
t
t
e
r
n
.

http://php-html.net/tutorials/model-view-controller-in-php/ Page 276 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

I
s
t
a
r
t
e
d
p
l
a
y
i
n
g
w
i
t
h
y
o
u
r
c
o
d
e
u
s
i
n
g
m
y

http://php-html.net/tutorials/model-view-controller-in-php/ Page 277 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

o
o
p
k
n
o
w
l
e
d
g
e
f
o
r
e
x
a
m
p
l
e
I
c
h
a
n
g
e
d
t
h
e
c

http://php-html.net/tutorials/model-view-controller-in-php/ Page 278 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

o
d
e
o
f
m
a
i
n
i
n
d
e
x
.
p
h
p
f
i
l
e
t
o

f
u
n
c
t
i
o
n
_

http://php-html.net/tutorials/model-view-controller-in-php/ Page 279 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

_
a
u
t
o
l
o
a
d
(
$
c
l
a
s
s
_
n
a
m
e
)
{
i
n
c
l
u
d
e
_
o
n
c

http://php-html.net/tutorials/model-view-controller-in-php/ Page 280 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

e

c
o
n
t
r
o
l
l
e
r
/

.
$
c
l
a
s
s
_
n
a
m
e
.

.
p
h
p

http://php-html.net/tutorials/model-view-controller-in-php/ Page 281 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM


;
}

$
c
o
n
t
r
o
l
l
e
r
=
n
e
w
C
o
n
t
r
o
l
l
e
r
(
)
;
$
c

http://php-html.net/tutorials/model-view-controller-in-php/ Page 282 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

o
n
t
r
o
l
l
e
r
-
>
i
n
v
o
k
e
(
)
;

p
i
y
u
s
h
)

http://php-html.net/tutorials/model-view-controller-in-php/ Page 283 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

http://php-html.net/tutorials/model-view-controller-in-php/ Page 284 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

http://php-html.net/tutorials/model-view-controller-in-php/ Page 285 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

http://php-html.net/tutorials/model-view-controller-in-php/ Page 286 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

r
e
a
l
l
y
g
o
o
d
e
x
p
a
n
a
t
i
o
n
o
f
m
v
c
t
h
n
x

http://php-html.net/tutorials/model-view-controller-in-php/ Page 287 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

S
a
j
a
n
(
h
t
t
p
:
/
/
t
e
c
h
t
i
p
s
.
n
e
t
a
u
.
n
e
t
/

http://php-html.net/tutorials/model-view-controller-in-php/ Page 288 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

)
)

http://php-html.net/tutorials/model-view-controller-in-php/ Page 289 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

http://php-html.net/tutorials/model-view-controller-in-php/ Page 290 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

http://php-html.net/tutorials/model-view-controller-in-php/ Page 291 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

S
u
p
e
r
b
E
x
p
l
a
n
a
t
i
o
n
.
.
T
h
a
n
k
y

http://php-html.net/tutorials/model-view-controller-in-php/ Page 292 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

o
u
G
u
y
s

N
i
t
i
n
D
e
e
p
a
k
(
h
t
t
p
:
/
/
n
i
t
i

http://php-html.net/tutorials/model-view-controller-in-php/ Page 293 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

n
d
e
e
p
a
k
.
i
n
)
)

http://php-html.net/tutorials/model-view-controller-in-php/ Page 294 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

http://php-html.net/tutorials/model-view-controller-in-php/ Page 295 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

http://php-html.net/tutorials/model-view-controller-in-php/ Page 296 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

E
x
c
e
l
l
e
n
t
T
u
t
o
r
i
a

http://php-html.net/tutorials/model-view-controller-in-php/ Page 297 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

l
I
h
a
d
e
v
e
r
t
a
s
t
e
.
M
.
V
.
C
.
i
s
n
o
t
a
s
t
r
a
n
g
e

http://php-html.net/tutorials/model-view-controller-in-php/ Page 298 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

r
a
n
y
m
o
r
e
.
I
t

s
g
r
e
a
t
t
o
r
e
c
e
i
v
e
s
u
c
h
g
u
i

http://php-html.net/tutorials/model-view-controller-in-php/ Page 299 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

d
a
n
c
e
.
I
a
m
r
e
a
l
l
y
v
e
r
y
t
h
a
n
k
f
u
l
t
o
t
h
e
a
u

http://php-html.net/tutorials/model-view-controller-in-php/ Page 300 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

t
h
o
r
(
s
)
.

J
)

http://php-html.net/tutorials/model-view-controller-in-php/ Page 301 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

http://php-html.net/tutorials/model-view-controller-in-php/ Page 302 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

http://php-html.net/tutorials/model-view-controller-in-php/ Page 303 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

T
h
a
n
k
s
f
o
r
t
h
e

http://php-html.net/tutorials/model-view-controller-in-php/ Page 304 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

t
u
t
o
r
i
a
l
.
H
o
n
e
s
t
l
y
,
i
t
i
s
a
l
i
t
t
l
e
h
a
r
d
t

http://php-html.net/tutorials/model-view-controller-in-php/ Page 305 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

o
r
e
a
d
b
e
c
a
u
s
e
o
f
t
h
e
g
r
a
m
m
a
r
.
(
I
t
i
s
i
n
t
e

http://php-html.net/tutorials/model-view-controller-in-php/ Page 306 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

r
e
s
t
i
n
g
t
o
m
e
t
h
a
t
s
o
m
e
o
n
e
w
i
t
h
s
u
c
h
a
n
a
f

http://php-html.net/tutorials/model-view-controller-in-php/ Page 307 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

f
i
n
i
t
y
f
o
r
c
o
m
p
u
t
e
r
l
a
n
g
u
a
g
e
d
o
e
s
n

t
t
h

http://php-html.net/tutorials/model-view-controller-in-php/ Page 308 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

i
n
k
s
u
b
j
e
c
t
/
v
e
r
b
r
e
l
a
t
i
o
n
s
h
i
p
s
a
r
e
i
m
p

http://php-html.net/tutorials/model-view-controller-in-php/ Page 309 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

o
r
t
a
n
t
)
.
E
x
a
m
p
l
e
:

T
h
e
c
o
n
t
r
o
l
l
e
r
i
s
t
h

http://php-html.net/tutorials/model-view-controller-in-php/ Page 310 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

e
f
i
r
s
t
t
h
i
n
g
w
h
i
c
h
t
a
k
e
s
[
p
r
o
p
e
r
]
a
r
e
q
u

http://php-html.net/tutorials/model-view-controller-in-php/ Page 311 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

e
s
t
,
p
a
r
s
e
[
S
]
i
t
,
i
n
i
t
i
a
l
i
z
e
[
S
]
a
n
d
i
n
v

http://php-html.net/tutorials/model-view-controller-in-php/ Page 312 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

o
k
e
[
S
]
t
h
e
m
o
d
e
l
a
n
d
t
a
k
e
s
[
p
r
o
p
e
r
]
t
h
e
m

http://php-html.net/tutorials/model-view-controller-in-php/ Page 313 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

o
d
e
l
r
e
s
p
o
n
s
e
a
n
d
s
e
n
d
[
S
]
i
t
t
o
t
h
e
p
r
e
s
e

http://php-html.net/tutorials/model-view-controller-in-php/ Page 314 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

n
t
a
t
i
o
n
l
a
y
e
r

.
I
t
j
u
s
t
m
a
d
e
m
e
h
a
v
e
t
o
r
e

http://php-html.net/tutorials/model-view-controller-in-php/ Page 315 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

a
d
i
t
a
c
o
u
p
l
e
o
f
t
i
m
e
s
b
e
f
o
r
e
I
g
o
t
t
h
e
m
e
a

http://php-html.net/tutorials/model-view-controller-in-php/ Page 316 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

n
i
n
g
.
T
h
e
r
e
w
a
s
a
l
o
t
o
f
t
h
a
t
.
Y
o
u
g
o
t
i
t
c
o

http://php-html.net/tutorials/model-view-controller-in-php/ Page 317 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

r
r
e
c
t
l
y
t
h
e
f
i
r
s
t
t
i
m
e
:

t
a
k
e
s

,
b
u
t
t
h
e

http://php-html.net/tutorials/model-view-controller-in-php/ Page 318 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

o
t
h
e
r
v
e
r
b
s
a
r
e
m
a
d
e
u
n
c
l
e
a
r
i
n
t
h
e
i
r
t
e
n

http://php-html.net/tutorials/model-view-controller-in-php/ Page 319 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

s
e
b
y
n
o
t
a
d
d
i
n
g
t
h
e

s

(
i
s
i
t
f
u
t
u
r
e
o
r
f
u

http://php-html.net/tutorials/model-view-controller-in-php/ Page 320 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

t
u
r
e
i
m
p
e
r
a
t
i
v
e
?
N
o
,
i
t

s
p
r
e
s
e
n
t
t
e
n
s
e

http://php-html.net/tutorials/model-view-controller-in-php/ Page 321 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

:

T
a
k
e
s

o
r

i
s
t
a
k
i
n
g

.
A
g
a
i
n
,
n
o
t
t
r
y
i

http://php-html.net/tutorials/model-view-controller-in-php/ Page 322 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

n
g
t
o
s
m
a
r
t
-
o
f
f
,
j
u
s
t
t
h
o
u
g
h
t
y
o
u
s
h
o
u
l
d

http://php-html.net/tutorials/model-view-controller-in-php/ Page 323 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

k
n
o
w
.

G
u
n
j
a
n
)

http://php-html.net/tutorials/model-view-controller-in-php/ Page 324 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

http://php-html.net/tutorials/model-view-controller-in-php/ Page 325 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

http://php-html.net/tutorials/model-view-controller-in-php/ Page 326 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

I
a
m
n
e
w
t
o
M
V

http://php-html.net/tutorials/model-view-controller-in-php/ Page 327 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

C
i
n
P
H
P
a
n
d
y
o
u
m
a
d
e
i
t
v
e
r
y
e
a
s
y
f
o
r
m
e
t
o
u

http://php-html.net/tutorials/model-view-controller-in-php/ Page 328 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

n
d
e
r
s
t
a
n
d
t
h
e
c
o
n
c
e
p
t
.

T
h
a
n
k
Y
o
u
.

http://php-html.net/tutorials/model-view-controller-in-php/ Page 329 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

o
p
s
a
n
a
B
a
r
i
d
a
(
h
t
t
p
:
/
/
p
o
p
s
y
p
e
d
i
a
.
o
r
g

http://php-html.net/tutorials/model-view-controller-in-php/ Page 330 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

)
)

http://php-html.net/tutorials/model-view-controller-in-php/ Page 331 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

http://php-html.net/tutorials/model-view-controller-in-php/ Page 332 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

http://php-html.net/tutorials/model-view-controller-in-php/ Page 333 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

I
h
a
v
e
t
o
s
a
y
t
h
a
t
t
h
i
s
i
s
a
v
e

http://php-html.net/tutorials/model-view-controller-in-php/ Page 334 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

r
y
c
o
o
l
t
u
t
o
r
i
a
l
.
.
I

l
l
a
l
s
o
l
i
k
e
t
o
a
d
d
t

http://php-html.net/tutorials/model-view-controller-in-php/ Page 335 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

h
a
t
m
v
c
i
s
m
u
c
h
m
o
r
e
e
a
s
i
e
r
t
o
i
m
p
l
e
m
e
n
t
i

http://php-html.net/tutorials/model-view-controller-in-php/ Page 336 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

n
o
o
p
(
O
b
j
e
c
t
O
r
i
e
n
t
e
d
P
r
o
g
r
a
m
m
i
n
g
)
.
I
d

http://php-html.net/tutorials/model-view-controller-in-php/ Page 337 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

o
n

t
k
n
o
w
a
b
o
u
t
m
v
c
i
n
a
s
p
e
c
t
o
r
i
e
n
t
e
d
a
p

http://php-html.net/tutorials/model-view-controller-in-php/ Page 338 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

p
r
o
a
c
h
f
o
r
p
h
p
.

V
a
n
a
r
a
j
)

http://php-html.net/tutorials/model-view-controller-in-php/ Page 339 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

http://php-html.net/tutorials/model-view-controller-in-php/ Page 340 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

http://php-html.net/tutorials/model-view-controller-in-php/ Page 341 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

http://php-html.net/tutorials/model-view-controller-in-php/ Page 342 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

N
i
c
e
t
u
t
o
r
e
i
a
l

V
a
n
a
r
a
j
)

http://php-html.net/tutorials/model-view-controller-in-php/ Page 343 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

http://php-html.net/tutorials/model-view-controller-in-php/ Page 344 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

http://php-html.net/tutorials/model-view-controller-in-php/ Page 345 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

http://php-html.net/tutorials/model-view-controller-in-php/ Page 346 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

N
i
c
e
T
u
t
o
r
i
a
l

F
r
a
n
c
i
s
c
o
(
h
t
t
p
:
/
/
a

http://php-html.net/tutorials/model-view-controller-in-php/ Page 347 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

d
p
j
a
.
c
o
.
c
c
)
)

http://php-html.net/tutorials/model-view-controller-in-php/ Page 348 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

http://php-html.net/tutorials/model-view-controller-in-php/ Page 349 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

http://php-html.net/tutorials/model-view-controller-in-php/ Page 350 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

O
b
r
i
g
a
d
o
p
o
r
c

http://php-html.net/tutorials/model-view-controller-in-php/ Page 351 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

o
m
p
a
r
t
i
l
h
a
r
t
a
e
x
e
c
e
l
e
n
t
e
,
n
ã
o
s
ó
p
e
l
o
f

http://php-html.net/tutorials/model-view-controller-in-php/ Page 352 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

a
t
o
d
e
s
e
r
n
o
v
o
e
m
m
v
c
.
m
a
s
e
s
t
a
d
e
m
a
i
s
v
a
l

http://php-html.net/tutorials/model-view-controller-in-php/ Page 353 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

e
u
m
e
s
m
o
.

R
a
s
h
i
d
)

http://php-html.net/tutorials/model-view-controller-in-php/ Page 354 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

http://php-html.net/tutorials/model-view-controller-in-php/ Page 355 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

http://php-html.net/tutorials/model-view-controller-in-php/ Page 356 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

T
h
a
n

http://php-html.net/tutorials/model-view-controller-in-php/ Page 357 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

k
y
o
u
,
a
v
e
r
y
c
o
m
p
l
e
t
e
a
n
d
c
o
m
p
r
e
h
e
n
s
i
v
e

http://php-html.net/tutorials/model-view-controller-in-php/ Page 358 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

t
u
t
o
r
i
a
l
a
b
o
u
t
M
V
C
w
i
t
h
g
r
e
a
t
e
x
a
m
p
l
e
.
T

http://php-html.net/tutorials/model-view-controller-in-php/ Page 359 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

h
i
s
h
e
l
p
m
e
a
l
o
t
a
b
o
u
t
u
n
d
e
r
s
t
a
n
d
i
n
g
M
V
C

http://php-html.net/tutorials/model-view-controller-in-php/ Page 360 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

s
i
t
h
a
r
a
)

http://php-html.net/tutorials/model-view-controller-in-php/ Page 361 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

http://php-html.net/tutorials/model-view-controller-in-php/ Page 362 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

http://php-html.net/tutorials/model-view-controller-in-php/ Page 363 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

e
x
c
e
l
l
e
n
t

http://php-html.net/tutorials/model-view-controller-in-php/ Page 364 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

.
t
h
a
n
k
y
o
u
u
.
.

R
a
v
i
B
h
a
d
a
u
r
i
a
(
h
t
t
p

http://php-html.net/tutorials/model-view-controller-in-php/ Page 365 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

:
/
/
w
w
w
.
a
d
m
e
c
i
n
d
i
a
.
c
o
.
i
n
)
)

http://php-html.net/tutorials/model-view-controller-in-php/ Page 366 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

http://php-html.net/tutorials/model-view-controller-in-php/ Page 367 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

http://php-html.net/tutorials/model-view-controller-in-php/ Page 368 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

http://php-html.net/tutorials/model-view-controller-in-php/ Page 369 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

N
i
c
e
e
x
p
l
a
n
a
t
i
o
n
,
i
g
o
t
s
o
m
e
u
s
e
f
u
l
p
o
i
n

http://php-html.net/tutorials/model-view-controller-in-php/ Page 370 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

t
s
f
r
o
m
t
h
i
s
.

t
h
a
n
k
s

R
a
v
i
(
h
t
t
p
:
/
/
m

http://php-html.net/tutorials/model-view-controller-in-php/ Page 371 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

a
g
e
n
t
o
)
)

http://php-html.net/tutorials/model-view-controller-in-php/ Page 372 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

http://php-html.net/tutorials/model-view-controller-in-php/ Page 373 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

http://php-html.net/tutorials/model-view-controller-in-php/ Page 374 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

T
h
a
n
k
s
f
o
r
t
h
o
s
e
t

http://php-html.net/tutorials/model-view-controller-in-php/ Page 375 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

u
t
o
r
i
a
l
s
.
I
w
a
s
l
o
o
k
i
n
g
t
h
i
s
t
y
p
e
o
f
t
u
t
o

http://php-html.net/tutorials/model-view-controller-in-php/ Page 376 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

r
i
a
l
n
o
w
.
T
h
i
s
M
V
C
e
x
p
l
a
n
a
t
i
o
n
i
s
e
a
s
y
t
o

http://php-html.net/tutorials/model-view-controller-in-php/ Page 377 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

u
n
d
e
r
s
t
a
n
d
.

m
a
n
i
s
h
t
h
a
p
a
(
h
t
t
p
:
/
/

http://php-html.net/tutorials/model-view-controller-in-php/ Page 378 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

m
j
t
.
c
o
m
.
n
p
)
)

http://php-html.net/tutorials/model-view-controller-in-php/ Page 379 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

http://php-html.net/tutorials/model-view-controller-in-php/ Page 380 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

http://php-html.net/tutorials/model-view-controller-in-php/ Page 381 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

t
h
a
n
k
s
f
o
r
t
h
e

http://php-html.net/tutorials/model-view-controller-in-php/ Page 382 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

M
V
C
t
u
t
o
r
i
a
l
,
b
e
s
t
s
o
f
a
r

c
a
n
y
o
u
h
e
l
p
m
e

http://php-html.net/tutorials/model-view-controller-in-php/ Page 383 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

l
i
n
k
i
n
g
M
V
C
w
i
t
h
R
E
S
T
I
w
o
u
l
d
b
e
t
h
a
n
k
f

http://php-html.net/tutorials/model-view-controller-in-php/ Page 384 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

u
l

S
a
s
w
a
t
a
S
u
n
d
a
r
)

http://php-html.net/tutorials/model-view-controller-in-php/ Page 385 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

http://php-html.net/tutorials/model-view-controller-in-php/ Page 386 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

http://php-html.net/tutorials/model-view-controller-in-php/ Page 387 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

T
h
a

http://php-html.net/tutorials/model-view-controller-in-php/ Page 388 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

n
k
s
a
l
o
t

.
G
r
e
a
t
t
u
t
o
r
i
a
l

K
u
m
a
r
e
s

http://php-html.net/tutorials/model-view-controller-in-php/ Page 389 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

h
)

http://php-html.net/tutorials/model-view-controller-in-php/ Page 390 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

http://php-html.net/tutorials/model-view-controller-in-php/ Page 391 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

http://php-html.net/tutorials/model-view-controller-in-php/ Page 392 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

C
o
u
l
d
y
o
u
p
o
s
t
a
n
o
t
h
e
r
e
x

http://php-html.net/tutorials/model-view-controller-in-php/ Page 393 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

a
m
p
l
e
i
n
m
v
c
.

M
a
s
o
u
d
)

http://php-html.net/tutorials/model-view-controller-in-php/ Page 394 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

http://php-html.net/tutorials/model-view-controller-in-php/ Page 395 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

http://php-html.net/tutorials/model-view-controller-in-php/ Page 396 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

http://php-html.net/tutorials/model-view-controller-in-php/ Page 397 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

S
i
m
p
l
y
g
r
e
a
t
,
n
i
c
e
l
y
d
o
n
e
.
T
h
a
n
k
y
o
u

http://php-html.net/tutorials/model-view-controller-in-php/ Page 398 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

P
C
T
e
c
h
n
o
l
o
g
y
(
h
t
t
p
:
/
/
p
c
-
t
e
c
h
n
i
c
.
b
l

http://php-html.net/tutorials/model-view-controller-in-php/ Page 399 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

o
g
s
p
o
t
.
c
o
m
)
)

http://php-html.net/tutorials/model-view-controller-in-php/ Page 400 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

http://php-html.net/tutorials/model-view-controller-in-php/ Page 401 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

http://php-html.net/tutorials/model-view-controller-in-php/ Page 402 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

T
h
a
n
k
y
o
u
s
o
m

http://php-html.net/tutorials/model-view-controller-in-php/ Page 403 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

u
c
h
.
I

v
e
b
e
e
n
h
a
r
d
c
o
d
i
n
g
P
H
P
f
o
r
a
l
o
n
g
t

http://php-html.net/tutorials/model-view-controller-in-php/ Page 404 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

i
m
e
n
o
w
b
u
t
n
e
v
e
r
w
a
n
t
e
d
t
o
g
i
v
e
f
r
a
m
e
w
o
r

http://php-html.net/tutorials/model-view-controller-in-php/ Page 405 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

k
s
o
r
c
o
n
c
e
p
t
s
a
t
r
y
.
R
e
c
e
n
t
l
y
,
I
t
r
i
e
d
g
e

http://php-html.net/tutorials/model-view-controller-in-php/ Page 406 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

t
t
i
n
g
i
n
t
o
Z
e
n
d
F
r
a
m
e
w
o
r
k
2
a
n
d
t
h
e
M
V
C
c
o

http://php-html.net/tutorials/model-view-controller-in-php/ Page 407 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

n
c
e
p
t
(
w
h
i
c
h
I

m
f
a
m
i
l
i
a
r
w
i
t
h
)
b
e
c
a
m
e
a

http://php-html.net/tutorials/model-view-controller-in-php/ Page 408 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

b
l
u
r
.
I
u
n
d
e
r
s
t
o
o
d
i
t
b
u
t
w
a
s
n

t
s
u
r
e
h
o
w

http://php-html.net/tutorials/model-view-controller-in-php/ Page 409 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

t
o
u
s
e
i
t
i
n
p
r
a
c
t
i
c
e
.
Y
o
u
g
a
v
e
m
e
a
c
l
e
a
r
u

http://php-html.net/tutorials/model-view-controller-in-php/ Page 410 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

n
d
e
r
s
t
a
n
d
i
n
g
o
f
i
t
a
n
d
n
o
w
I
c
a
n
p
r
o
c
e
e
d
t

http://php-html.net/tutorials/model-view-controller-in-php/ Page 411 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

o
l
e
a
r
n
f
u
r
t
h
e
r
a
n
d
e
n
h
a
n
c
e
m
y
a
p
p
l
i
c
a
t
i

http://php-html.net/tutorials/model-view-controller-in-php/ Page 412 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

o
n
s
.

C
h
e
e
r
s
.

R
u
s
t
y
)

http://php-html.net/tutorials/model-view-controller-in-php/ Page 413 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

http://php-html.net/tutorials/model-view-controller-in-php/ Page 414 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

http://php-html.net/tutorials/model-view-controller-in-php/ Page 415 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

http://php-html.net/tutorials/model-view-controller-in-php/ Page 416 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

J
u
s
t
w
a
n
t
e
d
t
o
s
e
n
d
y
o
u
a
b
i
g
T
H
A
N
K
S
a
l
s
o
i

http://php-html.net/tutorials/model-view-controller-in-php/ Page 417 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

n
d
e
c
e
m
b
e
r
2
0
1
2
,
j
u
s
t
t
o
s
h
o
w
t
h
a
t
t
h
i
s
p
o

http://php-html.net/tutorials/model-view-controller-in-php/ Page 418 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

s
t
i
s
s
t
i
l
l
v
e
r
y
m
u
c
h
b
e
i
n
g
a
p
p
r
e
c
i
a
t
e
d

http://php-html.net/tutorials/model-view-controller-in-php/ Page 419 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

J
e
f
f
r
y
)

http://php-html.net/tutorials/model-view-controller-in-php/ Page 420 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

http://php-html.net/tutorials/model-view-controller-in-php/ Page 421 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

http://php-html.net/tutorials/model-view-controller-in-php/ Page 422 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

C
a
n
y
o
u
u
p
d
a
t
e
t

http://php-html.net/tutorials/model-view-controller-in-php/ Page 423 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

h
e
a
r
t
i
c
l
e
a
n
d
s
h
o
w
t
h
e
a
d
d
,
u
p
d
a
t
e
,
a
n
d
d

http://php-html.net/tutorials/model-view-controller-in-php/ Page 424 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

e
l
e
t
e
f
u
n
c
t
i
o
n
s
?
S
h
o
w
h
o
w
y
o
u
w
o
u
l
d
a
d
d
,

http://php-html.net/tutorials/model-view-controller-in-php/ Page 425 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

e
t
c
.
t
o
t
h
e
a
r
r
a
y
.
Y
o
u
r
a
r
t
i
c
l
e
i
s
c
l
e
a
r
a

http://php-html.net/tutorials/model-view-controller-in-php/ Page 426 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

n
d
s
i
m
p
l
e
.

T
h
a
n
k
y
o
u
.

v
e
n
k
a
t
r
a
j
u
)

http://php-html.net/tutorials/model-view-controller-in-php/ Page 427 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

http://php-html.net/tutorials/model-view-controller-in-php/ Page 428 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

http://php-html.net/tutorials/model-view-controller-in-php/ Page 429 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

http://php-html.net/tutorials/model-view-controller-in-php/ Page 430 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

v
e
r
y
n
i
c
e
t
u
t
o
r
i
a
l

.

a
d
m

http://php-html.net/tutorials/model-view-controller-in-php/ Page 431 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

i
n
)

http://php-html.net/tutorials/model-view-controller-in-php/ Page 432 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

http://php-html.net/tutorials/model-view-controller-in-php/ Page 433 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

http://php-html.net/tutorials/model-view-controller-in-php/ Page 434 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

I
f
i
x
e
d
s
o
m
e
o
f
t
h
e
g
r
a
m
m
a
r
m

http://php-html.net/tutorials/model-view-controller-in-php/ Page 435 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

i
s
t
a
k
e
s
.
I
h
a
p
p
e
n
s
a
l
o
t
s
i
n
c
e
E
n
g
l
i
s
h
i
s

http://php-html.net/tutorials/model-view-controller-in-php/ Page 436 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

n
o
t
m
y
n
a
t
i
v
e
l
a
n
g
u
a
g
e
,
b
u
t
I
t
r
y
t
o
i
m
p
r
o

http://php-html.net/tutorials/model-view-controller-in-php/ Page 437 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

v
e
i
t
.
T
h
a
n
k
s
f
o
r
p
o
i
n
t
i
n
g
i
t
o
u
t
.

W
e

http://php-html.net/tutorials/model-view-controller-in-php/ Page 438 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

y
(
h
t
t
p
:
/
/
w
w
w
.
s
i
r
p
s
.
c
o
m
)
)

http://php-html.net/tutorials/model-view-controller-in-php/ Page 439 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

http://php-html.net/tutorials/model-view-controller-in-php/ Page 440 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

http://php-html.net/tutorials/model-view-controller-in-php/ Page 441 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

http://php-html.net/tutorials/model-view-controller-in-php/ Page 442 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

V
e
r
y
g
o
o
d
e
x
p
l
a
n
a
t
i
o
n
a
b
o
u
t
M
V
C
,
T
h
a
n
k
s

http://php-html.net/tutorials/model-view-controller-in-php/ Page 443 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

f
o
r
s
h
a
r
i
n
g

L
o
s
)

http://php-html.net/tutorials/model-view-controller-in-php/ Page 444 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

http://php-html.net/tutorials/model-view-controller-in-php/ Page 445 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

http://php-html.net/tutorials/model-view-controller-in-php/ Page 446 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

A
g
r
e
a
t
t

http://php-html.net/tutorials/model-view-controller-in-php/ Page 447 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

u
t
o
r
i
a
l
t
h
a
t

s
s
e
e
n
t
h
e
t
e
s
t
o
f
t
i
m
e
a
n
d
s

http://php-html.net/tutorials/model-view-controller-in-php/ Page 448 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

t
i
l
l
r
e
l
e
v
a
n
t
t
o
d
a
y
,
I
h
a
v
e
r
e
a
d
t
h
o
u
s
a
n

http://php-html.net/tutorials/model-view-controller-in-php/ Page 449 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

d
s
o
f
o
n
l
i
n
e
t
u
t
o
r
i
a
l
s
i
n
m
y
t
i
m
e
,
a
n
d
t
h
e

http://php-html.net/tutorials/model-view-controller-in-php/ Page 450 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

s
t
y
l
e
o
f
t
h
i
s
o
n
e
w
o
u
l
d
b
e
t
h
e
b
e
s
t
I
h
a
v
e
s

http://php-html.net/tutorials/model-view-controller-in-php/ Page 451 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

e
e
n
.
I
a
l
s
o
w
r
i
t
e
T
u
t
o
r
i
a
l
s
f
o
r
a
u
n
i
v
e
r
s

http://php-html.net/tutorials/model-view-controller-in-php/ Page 452 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

i
t
y
i
n
a
s
i
m
i
l
a
r
s
t
y
l
e
f
o
r
s
t
u
d
e
n
t
s
t
r
y
i
n

http://php-html.net/tutorials/model-view-controller-in-php/ Page 453 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

g
t
o
c
o
m
p
r
e
h
e
n
d
c
o
m
p
l
e
x
p
r
o
g
r
a
m
m
i
n
g
c
o
n

http://php-html.net/tutorials/model-view-controller-in-php/ Page 454 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

c
e
p
t
s
.
S
u
r
e
t
h
e
r
e
a
r
e
m
i
n
o
r
t
e
c
h
n
i
c
a
l
t
h

http://php-html.net/tutorials/model-view-controller-in-php/ Page 455 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

i
n
g
s
t
h
a
t
c
o
u
l
d
b
e
i
m
p
r
o
v
e
d
o
n
i
n
y
o
u
r
t
u
t

http://php-html.net/tutorials/model-view-controller-in-php/ Page 456 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

o
r
i
a
l
(
b
u
t
I
u
n
d
e
r
s
t
a
n
d
f
o
r
s
i
m
p
l
i
c
i
t
y
w

http://php-html.net/tutorials/model-view-controller-in-php/ Page 457 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

h
y
y
o
u
d
i
d
i
t
t
h
a
t
w
a
y
)
,
b
u
t
y
o
u
h
a
v
e
a
n
e
x
c

http://php-html.net/tutorials/model-view-controller-in-php/ Page 458 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

e
l
l
e
n
t
w
a
y
o
f
m
a
k
i
n
g
t
h
e
c
o
m
p
l
e
x
,
s
i
m
p
l
e

http://php-html.net/tutorials/model-view-controller-in-php/ Page 459 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

.
I
t
w
o
u
l
d
b
e
n
i
c
e
t
o
s
e
e
t
h
i
s
a
s
a
s
e
r
i
e
s
o
f

http://php-html.net/tutorials/model-view-controller-in-php/ Page 460 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

a
r
t
i
c
l
e
s
i
n
a
s
i
m
i
l
a
r
s
i
m
p
l
e
s
t
y
l
e
c
o
v
e
r

http://php-html.net/tutorials/model-view-controller-in-php/ Page 461 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

i
n
g
h
o
w
S
Q
L
i
s
p
o
p
u
l
a
t
e
d
i
n
t
o
m
o
d
e
l
s
a
n
d
e

http://php-html.net/tutorials/model-view-controller-in-php/ Page 462 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

v
e
n
t
u
a
l
l
y
e
v
o
l
v
i
n
g
t
o
t
h
e
c
o
n
c
e
p
t
o
f
H
M
V

http://php-html.net/tutorials/model-view-controller-in-php/ Page 463 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

C
.
B
y
t
h
e
w
a
y
I
h
a
v
e
a
l
w
a
y
s
u
s
e
d
a
s
e
p
a
r
a
t
e

http://php-html.net/tutorials/model-view-controller-in-php/ Page 464 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

m
o
d
e
l
t
o
t
h
e
d
a
t
a
m
o
d
e
l
a
s
y
o
u
d
o
b
u
t
I
c
a
l
l

http://php-html.net/tutorials/model-view-controller-in-php/ Page 465 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

m
y
m
o
d
e
l
c
l
a
s
s
t
h
e
p
l
u
r
a
l
o
f
t
h
e
d
a
t
a
c
l
a
s

http://php-html.net/tutorials/model-view-controller-in-php/ Page 466 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

s
a
s
i
n

B
o
o
k
s

,
i
t
h
a
n
d
l
e
s
a
l
l
t
h
e
S
Q
L
a
n
d

http://php-html.net/tutorials/model-view-controller-in-php/ Page 467 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

m
u
l
t
i
p
l
e
b
o
o
k
o
b
j
e
c
t
s
a
n
d
c
a
n
a
n
d
r
e
t
u
r
n

http://php-html.net/tutorials/model-view-controller-in-php/ Page 468 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

a
n
a
r
r
a
y
o
f
b
o
o
k
o
b
j
e
c
t
s
t
o
p
a
s
s
a
r
o
u
n
d
t
h

http://php-html.net/tutorials/model-view-controller-in-php/ Page 469 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

e
a
p
p
l
i
c
a
t
i
o
n
.
T
h
e
n
a
m
i
n
g
c
o
n
v
e
n
t
i
o
n
p
l

http://php-html.net/tutorials/model-view-controller-in-php/ Page 470 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

u
r
a
l
o
f
d
a
t
a
o
b
j
e
c
t
m
a
k
e
s
i
t
e
a
s
i
e
r
t
o
f
o
l

http://php-html.net/tutorials/model-view-controller-in-php/ Page 471 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

l
o
w
c
o
d
e
.
I
w
o
u
l
d
l
i
k
e
t
o
p
u
b
l
i
s
h
m
y
w
o
r
k
t

http://php-html.net/tutorials/model-view-controller-in-php/ Page 472 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

o
t
h
e
W
W
W
f
o
r
t
h
e
b
e
n
e
f
i
t
o
f
o
t
h
e
r
s
b
u
t
i
t
s

http://php-html.net/tutorials/model-view-controller-in-php/ Page 473 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

c
o
p
y
r
i
g
h
t
i
s
o
w
n
e
d
b
y
h
e
u
n
i
v
e
r
s
i
t
y
t
h
a
t

http://php-html.net/tutorials/model-view-controller-in-php/ Page 474 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

I
w
o
r
k
f
o
r
.
M
a
y
b
e
i
n
r
e
t
i
r
e
m
e
n
t

.
I
c
o
u
l
d

http://php-html.net/tutorials/model-view-controller-in-php/ Page 475 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

c
o
n
t
i
n
u
e
m
y
p
a
s
s
i
o
n
o
n
l
i
n
e
.

S
a
m
(
h
t

http://php-html.net/tutorials/model-view-controller-in-php/ Page 476 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

t
p
:
/
/
r
e
a
d
y
m
a
d
e
c
o
d
e
.
c
o
m
)
)

http://php-html.net/tutorials/model-view-controller-in-php/ Page 477 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

http://php-html.net/tutorials/model-view-controller-in-php/ Page 478 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

http://php-html.net/tutorials/model-view-controller-in-php/ Page 479 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

http://php-html.net/tutorials/model-view-controller-in-php/ Page 480 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

A
w
e
s
o
m
e
i
d
e
a
s

a
t
u
l
)

http://php-html.net/tutorials/model-view-controller-in-php/ Page 481 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

http://php-html.net/tutorials/model-view-controller-in-php/ Page 482 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

http://php-html.net/tutorials/model-view-controller-in-php/ Page 483 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

g
r
e
a
t
t

http://php-html.net/tutorials/model-view-controller-in-php/ Page 484 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

u
t
o
r
i
a
l
f
o
r
o
n
e
b
e
g
i
n
n
i
n
g
w
i
t
h
M
V
C
.

http://php-html.net/tutorials/model-view-controller-in-php/ Page 485 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

B
r
u
c
e
)

http://php-html.net/tutorials/model-view-controller-in-php/ Page 486 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

http://php-html.net/tutorials/model-view-controller-in-php/ Page 487 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

http://php-html.net/tutorials/model-view-controller-in-php/ Page 488 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

I
g
o
t
t
h
i
s
w
e
b
s
i
t
e
f
r
o

http://php-html.net/tutorials/model-view-controller-in-php/ Page 489 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

m
m
y
f
r
i
e
n
d
w
h
o
s
h
a
r
e
d
w
i
t
h
m
e
r
e
g
a
r
d
i
n
g
t

http://php-html.net/tutorials/model-view-controller-in-php/ Page 490 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

h
i
s
w
e
b
p
a
g
e
a
n
d
a
t
t
h
e
m
o
m
e
n
t
t
h
i
s
t
i
m
e
I
a

http://php-html.net/tutorials/model-view-controller-in-php/ Page 491 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

m
b
r
o
w
s
i
n
g
t
h
i
s
w
e
b
s
i
t
e
a
n
d
r
e
a
d
i
n
g
v
e
r
y

http://php-html.net/tutorials/model-view-controller-in-php/ Page 492 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

i
n
f
o
r
m
a
t
i
v
e
p
o
s
t
s
h
e
r
e
.

B
l
o
s
s
o
m
(
h

http://php-html.net/tutorials/model-view-controller-in-php/ Page 493 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

t
t
p
:
/
/
p
h
p
-
h
t
m
l
.
n
e
t
/
t
u
t
o
r
i
a
l
s
/
m
o
d
e
l

http://php-html.net/tutorials/model-view-controller-in-php/ Page 494 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

-
v
i
e
w
-
c
o
n
t
r
o
l
l
e
r
-
i
n
-
p
h
p
/
)
)

http://php-html.net/tutorials/model-view-controller-in-php/ Page 495 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

http://php-html.net/tutorials/model-view-controller-in-php/ Page 496 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

http://php-html.net/tutorials/model-view-controller-in-php/ Page 497 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

http://php-html.net/tutorials/model-view-controller-in-php/ Page 498 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

D
e
a
r
A
d
m
i
n
,

I
r
e
a
l
l
y
a
p
p
r
e
c
i
a
t
e
y
o
u
r
a
r

http://php-html.net/tutorials/model-view-controller-in-php/ Page 499 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

t
i
c
l
e
f
o
r
e
v
e
r
s
i
m
p
l
e
s
t
w
a
y
t
o
k
n
o
w
b
a
s
i
c

http://php-html.net/tutorials/model-view-controller-in-php/ Page 500 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

m
e
a
n
i
n
g
o
f
M
V
C
a
n
d
w
a
y
o
u
t
t
o
s
t
a
r
t
w
i
t
h
i
t

http://php-html.net/tutorials/model-view-controller-in-php/ Page 501 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

a
n
d
g
e
t
k
n
o
w
l
e
d
g
e
t
o
l
e
a
r
n
c
o
m
p
l
e
x
f
r
a
m
e

http://php-html.net/tutorials/model-view-controller-in-php/ Page 502 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

w
o
r
k
s
.

I
h
a
v
e
o
n
e
q
u
e
r
y
,
y
o
u
e
x
p
l
a
i
n
e
d
v

http://php-html.net/tutorials/model-view-controller-in-php/ Page 503 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

e
r
y
w
e
l
l
h
o
w
w
e
c
a
n
f
e
t
c
h
D
a
t
a
f
r
o
m
M
o
d
e
l
a

http://php-html.net/tutorials/model-view-controller-in-php/ Page 504 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

n
d
d
i
s
p
l
a
y
i
t
o
n
V
i
e
w
b
u
t
I
w
i
l
l
b
e
g
r
a
t
e
f
u

http://php-html.net/tutorials/model-view-controller-in-php/ Page 505 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

l
t
o
y
o
u
i
f
y
o
u
p
l
e
a
s
e
e
x
p
l
a
i
n
e
x
t
e
n
d
e
d
v
e

http://php-html.net/tutorials/model-view-controller-in-php/ Page 506 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

r
s
i
o
n
o
f
t
h
i
s
A
r
t
i
c
l
e
w
i
t
h
a
n
y
U
s
e
r
i
n
p
u
t

http://php-html.net/tutorials/model-view-controller-in-php/ Page 507 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

F
o
r
,
w
h
i
c
h
w
i
l
l
b
e
g
o
i
n
g
t
o
s
a
v
e
i
n
t
o
t
h
e
D

http://php-html.net/tutorials/model-view-controller-in-php/ Page 508 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

a
t
a
b
a
s
e
.

I
a
m
P
H
P
p
r
o
g
r
a
m
m
e
r
,
I
k
n
o
w
h
o
w

http://php-html.net/tutorials/model-view-controller-in-php/ Page 509 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

t
o
c
r
e
a
t
e
t
h
i
s
i
n
N
o
r
m
a
l
C
o
r
e
P
H
P
p
r
o
j
e
c
t

http://php-html.net/tutorials/model-view-controller-in-php/ Page 510 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

b
u
t
I
a
m
w
o
n
d
e
r
i
n
g
i
f
y
o
u
c
o
u
l
d
h
e
l
p
m
e
t
o
s

http://php-html.net/tutorials/model-view-controller-in-php/ Page 511 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

t
a
r
t
w
i
t
h
i
t
.

I
t
r
u
s
t
,
y
o
u
w
i
l
l
r
e
s
p
o
n
d
m

http://php-html.net/tutorials/model-view-controller-in-php/ Page 512 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

y
q
u
e
r
y
a
t
e
a
r
l
i
e
s
t
.

C
h
e
e
r
s
!
B
l
o
s
s
o
m

http://php-html.net/tutorials/model-view-controller-in-php/ Page 513 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

R
a
j
n
e
s
h
)

http://php-html.net/tutorials/model-view-controller-in-php/ Page 514 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

http://php-html.net/tutorials/model-view-controller-in-php/ Page 515 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

http://php-html.net/tutorials/model-view-controller-in-php/ Page 516 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

g
o
o
d
o
n
e

M
r
u
n
a
l
)

http://php-html.net/tutorials/model-view-controller-in-php/ Page 517 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

http://php-html.net/tutorials/model-view-controller-in-php/ Page 518 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

http://php-html.net/tutorials/model-view-controller-in-php/ Page 519 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

http://php-html.net/tutorials/model-view-controller-in-php/ Page 520 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

G
o
o
d
I
d
e
a
s
.
.

K
i
r
i
t
P
a
t
e
l
)

http://php-html.net/tutorials/model-view-controller-in-php/ Page 521 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

http://php-html.net/tutorials/model-view-controller-in-php/ Page 522 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

http://php-html.net/tutorials/model-view-controller-in-php/ Page 523 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

http://php-html.net/tutorials/model-view-controller-in-php/ Page 524 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

I
t
i
s
n
i
c
e
b
l
o
g
f
o
r
b
e
g
g
i
n
e
r
h
o
w
w

http://php-html.net/tutorials/model-view-controller-in-php/ Page 525 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

a
n
t
t
o
l
e
a
r
n
M
V
C
s
t
r
u
c
t
u
r
e
.
T
h
i
s
i
s
h
e
l
p
f

http://php-html.net/tutorials/model-view-controller-in-php/ Page 526 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

u
l
f
o
r
m
e
a
l
s
o
.
T
h
a
n
k
s
f
o
r
t
h
a
t
.

G
a
n
d

http://php-html.net/tutorials/model-view-controller-in-php/ Page 527 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

u
b
h
a
a
i
)

http://php-html.net/tutorials/model-view-controller-in-php/ Page 528 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

http://php-html.net/tutorials/model-view-controller-in-php/ Page 529 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

http://php-html.net/tutorials/model-view-controller-in-php/ Page 530 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

w
h
a
t
t
t
t
t
t
t
t
a
t
u
t
o
r

http://php-html.net/tutorials/model-view-controller-in-php/ Page 531 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

i
a
l
m
a
n

i
f
i
w
o
u
l
d
h
a
v
e
b
e
e
n
a
g
i
r
l
,
i
w
o
u
l

http://php-html.net/tutorials/model-view-controller-in-php/ Page 532 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

d
h
a
v
e
m
a
r
r
i
e
d
t
o
y
o
u
t
h
e
m
o
m
e
n
t
i
w
o
u
l
d
h
a

http://php-html.net/tutorials/model-view-controller-in-php/ Page 533 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

v
e
s
e
e
n
y
o
u
o
r
m
e
e
t
y
o
u
.
i
l
o
v
e
y
o
u
m
a
n
.
s
u
c

http://php-html.net/tutorials/model-view-controller-in-php/ Page 534 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

h
a
n
i
c
e
,
s
i
m
p
l
e
n
h
e
l
p
f
u
l
t
u
t
o
r
i
a
l
e
v
e
n
i

http://php-html.net/tutorials/model-view-controller-in-php/ Page 535 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

n
2
0
1
5
.


























.
.

http://php-html.net/tutorials/model-view-controller-in-php/ Page 536 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

a
n
d
t
h
e
s
p
e
c
i
a
l
m
e
s
s
a
g
e
t
o

J

w
h
o
c
o
m
m
e
n

http://php-html.net/tutorials/model-view-controller-in-php/ Page 537 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

t
e
d
a
b
o
v
e



m
a
n
.
j
u
s
t
b
u
y
a
g
r
a
m
m
a
r
-
b
o
o

http://php-html.net/tutorials/model-view-controller-in-php/ Page 538 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

k
a
n
d

C
o
m
m
e
n
t
n
a
v
i
g
a

http://php-html.net/tutorials/model-view-controller-in-php/ Page 539 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

t
i
o
n

Ol
de
r
Co
m
m
en
ts
(ht
tp:
//p
hp
-
ht
ml
.n
et/
tut
ori
als
/m
od
el-
vie
w-

http://php-html.net/tutorials/model-view-controller-in-php/ Page 540 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

co
ntr
oll
er-
in-
ph
p/
co
m
m
en
t-
pa
ge
-
2/
#c
o
m
m
en
ts)

LE
AV
EA
CO
M
ME
NT.

Co

me

nt

http://php-html.net/tutorials/model-view-controller-in-php/ Page 541 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

Na

me

Em

ail

We

bsi

te

Post Comment

Proudly powered by WordPress (http://wordpress.org/). Theme: DW Minion by DesignWall


(http://www.designwall.com/).

http://php-html.net/tutorials/model-view-controller-in-php/ Page 542 of 543


Model View Controller(MVC) In PHP Tutorial 8/28/16, 11:09 PM

http://php-html.net/tutorials/model-view-controller-in-php/ Page 543 of 543

You might also like