hi
i have a newslist table that shows all news titles being published.news are displayed using while loop.
i want to add a check box on left side of each news title, i want when users check multiple checkboxes,news id associated with theses checkboxes shold be taken and the selted news must be deleted from database
any one can help plz.
Regards....
shahiduop
0
Newbie Poster
Recommended Answers
Jump to PostHere i have written complete code.
Try it, its easy to understand.<? mysql_connect('localhost','root',''); mysql_select_db('test'); if(isset($_REQUEST['delete'])) { $deleteCb = $_REQUEST['deleteCb']; for($i=0;$i<count($deleteCb);$i++) { $news_id = $deleteCb[$i]; $q = "delete from newslist where news_id= ".$news_id; mysql_query($q); } header("location:test.php"); exit; } ?> <form name="form" id="form" method="post"> <table width="400" border="1" cellspacing="0" …
All 6 Replies
Will Gresham
81
Master Poster
vibhaJ
126
Master Poster
shahiduop
0
Newbie Poster
dnyaneshk2
0
Newbie Poster
pushpatiwari
0
Newbie Poster
pushpatiwari
0
Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.