Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Old 04-27-2010, 05:10 PM Checkbox array
seventeen's Avatar
Novice Talker

Posts: 6
Trades: 0
Hi...
Can anyone give me some advice, how to keep the checked checkbox if i change my webpage..

for example i want to delete posting 'a' in first page of my web, then i checked the post 'a' checkbox, and i also want to delete posting 'b' in page 2, i want to delete two of them at once..

Thank again for any of your help
__________________
Be Good Webmaster

Please login or register to view this content. Registration is FREE
seventeen is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 04-27-2010, 05:13 PM Re: Checkbox array
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,384
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
http://www.webmaster-talk.com/php-fo...-checkbox.html
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 04-28-2010, 01:39 AM Re: Checkbox array
Skilled Talker

Posts: 84
Name: Jonthy
Trades: 0
You can use this code it will help you for sure -

<?php if(isset($_REQUEST['delete']))
{
$checklist = $_REQUEST["checkbox"];
for($i=0; $i<count($checklist); $i++)
{
$chk_value=$checklist;
$sql="DELETE FROM <table-name> WHERE itemid=".$chk_value[$i];
$result = mysql_query($sql);
header('location:index.php');
}
}
?>
<?php
while($rows=mysql_fetch_array($result)){
<input name="checkbox[]" type="checkbox" id="checkbox[]" value="<? echo $rows['itemid']; ?>">
<input name="delete" type="Submit" id="delete" value="Delete">
__________________

Please login or register to view this content. Registration is FREE
itandseoservice is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Checkbox array
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.16828 seconds with 12 queries