Deleting from Search

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
l_jimb_l
Forum Newbie
Posts: 5
Joined: Fri Oct 11, 2002 11:57 am

Deleting from Search

Post 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.
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post 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.
Post Reply