Hi Joseph Griffin, This is really very helpful. Many thanks. Sovichea On Sun, Jan 24, 2010 at 12:24 AM, Joseph Griffin <griffinhere@xxxxxxxxx>wrote: > > > Hi friend.. > > I think this will work for you. > > Execute this code: > > /* beginning of file */ > > <?php > if( isset($_POST['submit']) ) { > if( empty($_POST['mycheckbox']) ) { > echo '<h2>No checkbox selected</h2>'; > } else { > echo '<strong>Query to Delete Items:</strong><br />'; > foreach( $_POST['mycheckbox'] as $value ) { > $deleteSql = 'DELETE FROM `myTable` WHERE `myTable`.`my_id` = ' . $value; > echo $deleteSql . '<br>'; > } > } > } > ?> > http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> > <head> > <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> > <title>Example</title> > </head> > > <body> > > <h2>Check the items to delete:</h2> > <form id="form1" name="form1" method="post" action=""> > <blockquote> > <input type="checkbox" name="mycheckbox[]" id="mycheckbox" value="1" />Item > 1<br /> > <input type="checkbox" name="mycheckbox[]" id="mycheckbox" value="2" />Item > 2<br /> > <input type="checkbox" name="mycheckbox[]" id="mycheckbox" value="3" />Item > 3<br /> > <input type="checkbox" name="mycheckbox[]" id="mycheckbox" value="4" />Item > 4<br /> > <input type="checkbox" name="mycheckbox[]" id="mycheckbox" value="5" />Item > 5<br /> > <input type="checkbox" name="mycheckbox[]" id="mycheckbox" value="6" />Item > 6<br /> > <input type="checkbox" name="mycheckbox[]" id="mycheckbox" value="7" />Item > 7<br /> > <input type="checkbox" name="mycheckbox[]" id="mycheckbox" value="8" />Item > 8<br /><br /> > </blockquote> > <input type="submit" name="submit" id="submit" value=" Delete Selected > Items " /> > </form> > </body> > </html> > > /* end of file */ > > > Hope this will work for you *-* > > Joseph Griffin > http://www.aspiredmind.com > > ________________________________ > From: Sovichea SOU <svch_sou@xxxxxxxxxxx <svch_sou%40yahoo.co.uk>> > To: php-objects@xxxxxxxxxxxxxxx <php-objects%40yahoogroups.com> > Sent: Sat, January 23, 2010 4:22:45 PM > Subject: Re: Query String > > > Hi, thanks for your reply. > > I have multi check boxes loop with data from database. > I want to delete many records at the same time. > > Any ideas? > > Vichea > > On Sat, Jan 23, 2010 at 11:47 AM, Behn00sh MoshtaGH <euruse@xxxxxxxxx<euruse%40gmail.com> > >wrote: > > > > > > > Hi > > you shouldn't use querystring in that way. > > i suggest this: > > http://localhost/news/index.php?*cID=56534/56581/**56587*&submit=Verify > > and then > > $id=$_REQUEST[cID]; > > > > thesn splite $id > > > > > > On Sat, Jan 23, 2010 at 6:14 AM, Sovichea SOU <svch_sou@xxxxxxxxxxx<svch_sou%40yahoo.co.uk> > <svch_sou%40yahoo.co.uk>> > > > wrote: > > > > > > > > > > > Hi, > > > > > > I want to delete multi records where id=5653, 56581,and 56587. > > > > > > > > > http://localhost/news/index.php?cID=56534&cID=56581&cID=56587&submit=Verify > > > > > > how to split cID from the url? > > > how to delete those records? > > > > > > Many thanks > > > > > > Vichea > > > > > > [Non-text portions of this message have been removed] > > > > > > > > > > > > > -- > > > > Behn00sh Moshtagh > > --~--~---------~--~----~------------~-------~--~-- > > > > [Non-text portions of this message have been removed] > > > > > > > > -- > Sovichea SOU > Email: chhit@xxxxxxxxx <chhit%40chhit.com> > sovichea@xxxxxxxxxx <sovichea%40jugcam.org> > Website: www.chhit.com - www.sovichea.info > > [Non-text portions of this message have been removed] > > ------------------------------------ > > > Are you looking for a PHP job? > Join the PHP Professionals directory Now! > http://www.phpclasses.org/jobs/ > Yahoo! Groups Links > > > [Non-text portions of this message have been removed] > > > [Non-text portions of this message have been removed] ------------------------------------ Are you looking for a PHP job? Join the PHP Professionals directory Now! http://www.phpclasses.org/jobs/ Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/php-objects/ <*> Your email settings: Individual Email | Traditional <*> To change settings online go to: http://groups.yahoo.com/group/php-objects/join (Yahoo! ID required) <*> To change settings via email: php-objects-digest@xxxxxxxxxxxxxxx php-objects-fullfeatured@xxxxxxxxxxxxxxx <*> To unsubscribe from this group, send an email to: php-objects-unsubscribe@xxxxxxxxxxxxxxx <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/