Event driven Programming in PHP

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
gajubhai
Forum Newbie
Posts: 4
Joined: Fri Apr 11, 2008 3:57 am

Event driven Programming in PHP

Post by gajubhai »

Dear All,
I am from ASP.NET back ground and new to PHP. I just started learning the PHP for my new assignment but I could not understand how to handle Postback. My PHP page has many controls which can do post back. Each control has to do different task on postback. It can be easily done using control's event in the ASP.NET but I wonder how can it be done in PHP.
How to make PHP page such that it will execute different code on post back caused by differnt controls.

This might be fullish query but please help. Also anybody could suggest be good PHP book for this?
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Re: Event driven Programming in PHP

Post by Christopher »

Things are rarely done in postback style in PHP. As I recall, .NET injects a bunch of Javascript and hidden fields to make their system work. However there are some systems in PHP that are built in this style. Prado is a framework that works this way. There are also a number of PHP/Ajax libraries that allow you to talk back-and-forth with PHP objects and Javascript objects.
(#10850)
Post Reply