I am writing a sort of custom Administrative UI.
I have implemented the php code that inserts and reads records from the DB table.
The records are visualized in a table in the UI in the below pattern:
test title
Added: 2011-12-29 17:34:35
test2
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
test title
Added: 2011-12-29 17:34:35 tests
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
test title2
Added: 2011-12-29 17:34:35 test22
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
I have the following structure for my database table:
TABLE news (
guid ,
lang ,
title ,
content ,
date,
PRIMARY KEY (guid, lang)
)
guid is generated with php com_create_guid () function.
How can I implement buttons Edit and Delete beside each item?
Thanks a lot!
In action.php:
you can make links instead giving each different url containing action and record id as GET parameters.
Suppose you have a file action.php. For record number 12 the “edit” link will go to “action.php?do=edit&record=12”, the “delete” link will go to “action.php?do=delete&record=12”.
In action.php: