ashrafzia Posted September 25, 2006 Share Posted September 25, 2006 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 https://forums.phpfreaks.com/topic/22010-simple-question-about-delete-query/ Share on other sites More sharing options...
Daniel0 Posted September 25, 2006 Share Posted September 25, 2006 Something like this should do it: [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] Link to comment https://forums.phpfreaks.com/topic/22010-simple-question-about-delete-query/#findComment-98370 Share on other sites More sharing options...
ashrafzia Posted September 25, 2006 Author Share Posted September 25, 2006 [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 https://forums.phpfreaks.com/topic/22010-simple-question-about-delete-query/#findComment-98379 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.