I have to use PHP for my Web based project and I need to hold some temporary data and at the same time display those temporary data in a table.

Those data should be editable (means if we remove some record, that change should be displayed in the underlying table). Functionality I need much similar to a "Order Form in Shopping Cart system". One order has many items and when use add more things they should display in a table below. Data is written to database when the user confirms the form. I think you got the idea.

Please tell me how to achieve similar functionality. Any code samples links to tutorials are welcome. I HAVE TO DO THESE THINGS USING PHP ONLY.