Jump to content

Simple Question about Delete Query


ashrafzia

Recommended Posts

I do know how to exectue the delete query but i just wanna clear my concept.
I have a table of Users, having user id's.
I have a button view all records which is used for displaying records from DB.
Now i want that each record should have an image named Delete infront of it and when i mouseover on that image the userid should automatically came on it and by clicking that image the delete query should execute.
And same to Edit Record
Link to comment
Share on other sites

[quote author=Daniel0 link=topic=109446.msg441118#msg441118 date=1159205619]
[code]<?php
//...
while($u = mysql_fetch_assoc($result))
{
echo <<<EOF
<p>{$u['username']} <button type="button" onclick="this.href='http://example.com/admin/index.php?act=members&func=delete&id={$u['id']}'">Delete</button></p>

EOF;
}
//...
?>
[/code]
[/quote]

Would you kindly give some explanation ?
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.