I need a single handler to handle all my request eg. add/mod/del/read.
Could any one suggest me which some algorithm for the best so that all request will be handle through single handler.
eg. While adding I did not passing the primary key to php script so it does insertion and whenever it gets primary key it does updates on it
I am using the same page for addition as well as for updation.
Pseudo code
$obj->getByID($_POST[ID]);
if($_POST && $_POST["add"]==1)
{
$obj->addUpdate($_POST);
}
Now everytime I need to pass ID from update page and then I passed this ID to object to get its records based on it it dynamically create <input> element with ID.
I want something better which should allow me directly add/update without checking up all these element in POST
Please help.
Thank you
Vijay




Bookmarks