Ask a Question related to PHP Development, Design and Development.
-
Franco Fellico' #1
Select a row to delete/modify
Hi.
Suppose to have read and displayed (using PHP) a group of row of a DB
table on a dinamyc table on a HTML/PHP page.
The number of row displayed could be from 1 to n. Each row contains
informations and also a cell with a unique ID of the element.
I would like to show at the beginning of each line of the table a
couple of cells containing two different icons (one for delete and one
for modify) so the user could click on it to delete/modify the
corresponding row on the DB table.
In other word I need to delete/modify the Dbtable row which have the
ID of the line where the icon was clicked. This means also that when a
icon is clicked I must jump to a PHP routine passing it the ID that
appears on the same line of the icon clicked.
I have seen a similar method of delete/modify on the phpAdmin program,
but I was unable to understand how it work because of the complexity
of that routines.
To achieve my need I can use, if necessary, also Javascript
statements.
Thank you from Franco in Italy
Franco Fellico' Guest
-
Can't delete .LCK files, so can't modify or save anychanges!
I am having a huge problem with .LCK files. I thought that these could only be generated in Contribute, but suddenly several of the directories in... -
Select and delete unused symbols won't record in an action
The selection and deletion of unused brushes, styles, and swatches from the palettes in a document record properly in an action. (For some reason the... -
SELECT OK, INSERT and DELETE Problems in Windows 2003
Hi, I´m not getting write, alter or exclude any register in my table. Only read without problems. What is happening ? Generate the error: -
Clearing "Clean" & a Select Modify question
Hi All, Suppose I have 100 X 100 pixel square filled in with Navy Blue. What I really want is to hollow out the inside of that square so that I... -
Loss of Modify Table > Delete Row or Insert Row in 6.1
I updated from 6.0 to 6.1 and now the Modify Table options are all greyed out. Is there another way to access them in 6.1? If not, I need to... -
Pedro Graca #2
Re: Select a row to delete/modify
Franco Fellico' wrote:
Include the record id in the link associated with the delete/modify> I would like to show at the beginning of each line of the table a
> couple of cells containing two different icons (one for delete and one
> for modify) so the user could click on it to delete/modify the
> corresponding row on the DB table.
>
> In other word I need to delete/modify the Dbtable row which have the
> ID of the line where the icon was clicked. This means also that when a
> icon is clicked I must jump to a PHP routine passing it the ID that
> appears on the same line of the icon clicked.
icon, for example:
<?php
// ...
// data from db is in the array $dbdata
foreach ($dbdata as $record) {
echo '<a href="delete.php?id=', $record['id'], '">delete</a> / ';
echo '<a href="modify.php?id=', $record['id'], '">modify</a>';
echo ' | ', $record['name'], ' | ', $record['eyecolor'], ' | '; // ...
// ...
}
?>
to generate HTML that looks like
_delete_ / _modify_ | Franco Fellico | brown | ...
_delete_ / _modify_ | Pedro Graca | brown | ...
...
and in delete.php and modify.php
check for $_GET['id'] and use it (after validating) for
deleting/modifying the record.
HTH
--
..sig
Pedro Graca Guest



Reply With Quote

