Page 1 of 1

Deleting from Search

Posted: Fri Oct 11, 2002 11:57 am
by l_jimb_l
First off, let me say I am very new to this, so I could be way off.
Here we go......

I have an administration page of sorts. It allows for addition of new users, as long as noone with that name already exists, and a search that allows the admin to search by username, first name, last name or department. The seaarch dynamically displays the results directly below the search box.

What I want....
With each row that is created I want a Delete (and eventually Modify) button to the right. Making the button appear is no problem. The problem is being able to uniquely identify each delete button from the previous, or following. I don't knwo, I could be going about this completely the wrong way.

Posted: Fri Oct 11, 2002 12:15 pm
by volka
this question has to be in either PHP or Databases but anyway.
if your db-table has a auto-increment field (and it should) you can add something like

Code: Select all

<form ....>
...<table>...
<td> _username_ </td>.....<td><input type="submit" name="delete" value="34" /></td>...
...</table>...
</form>
where 34 is the value of the auto-increment field of that record.