Connecting Tech Pros Worldwide Forums | Help | Site Map

new to patterns - example of simple PHP page controller for login and database driven pages?

NotGiven
Guest
 
Posts: n/a
#1: Dec 23 '05
I am new to patterns and want to learn how to implement the PAGE CONTROLLER
model for a web site that has log-in and where the pages are dynamic
database driven pages.

I will have many questions along the way but one is:
-- It looks like you use $_GET variables to provide instrucitons for the
next action. Can you use $POST instead? Advatnages /disadvantages of
either?

Thanks.



Jonathan
Guest
 
Posts: n/a
#2: Dec 23 '05

re: new to patterns - example of simple PHP page controller for login and database driven pages?


NotGiven wrote:[color=blue]
> I am new to patterns and want to learn how to implement the PAGE CONTROLLER
> model for a web site that has log-in and where the pages are dynamic
> database driven pages.
>
> I will have many questions along the way but one is:
> -- It looks like you use $_GET variables to provide instrucitons for the
> next action. Can you use $POST instead? Advatnages /disadvantages of
> either?
>
> Thanks.[/color]

I think you can use both, depends on your implementation.

See the following link for an explanation of the GET and POST methods
for HTML forms:

http://www.jmarshall.com/easy/cgi/cg...html#getvspost

Jonathan
John Meyer
Guest
 
Posts: n/a
#3: Dec 23 '05

re: new to patterns - example of simple PHP page controller for login and database driven pages?


NotGiven wrote:
[color=blue]
> I am new to patterns and want to learn how to implement the PAGE
> CONTROLLER model for a web site that has log-in and where the pages are
> dynamic database driven pages.
>
> I will have many questions along the way but one is:
> -- It looks like you use $_GET variables to provide instrucitons for the
> next action. Can you use $POST instead? Advatnages /disadvantages of
> either?
>
> Thanks.[/color]


Basic difference between the two: $_GET variables are appended to the end
of a URL, post variables are not. You can have a form as with a "get" or
"post" method.
Closed Thread