Posted: Thu Jul 21, 2005 4:11 pm
Code: Select all
echo $_POST['deletethese'];
print_r ($_POST['deletethese']);A community of PHP developers offering assistance, advice, discussion, and friendship.
http://forums.devnetwork.net/
Code: Select all
echo $_POST['deletethese'];
print_r ($_POST['deletethese']);Code: Select all
<?php
echo '<form><table width ="100%">';
$count = 0;
foreach (glob("imagestest/*.jpg") as $filename) {
echo "<td width='100'><a
href='http://www.dustinyonak.net/$filename'><img
src='$filename' width='80' height='60'></a><br />" .
round(filesize($filename)/1024) . "KB <input type='checkbox'
name='deletethese[]' value='$filename'></td>";
$count ++;
if($count==5){
echo "</tr><tr>";
$count = 0;
}
}
echo '</table>';
echo '<input type="submit" name="delsubmit" value="Delete
Selected Images">';
echo '</form>';
//Handle the deletion form
$count = 0;
echo $_POST['deletethese'];
print_r ($_POST['deletethese']);
if (isset($_POST['delsubmit'])) {
$deletethese = $_POST['deletethese'];
foreach($deletethese as $index=>$deletethis){
$count ++;
}
}
echo "$count images deleted.";Code: Select all
<?php
//Handle the deletion form
if(isset($_POST['deletethese'])){
echo $_POST['deletethese'];
print_r ($_POST['deletethese']);
}else
echo "post vars not set yet";
echo '<form><table width ="100%">';
$count = 0;
foreach (glob("imagestest/*.jpg") as $filename) {
echo "<td width='100'><a
href='http://www.dustinyonak.net/$filename'><img
src='$filename' width='80' height='60'></a><br />" .
round(filesize($filename)/1024) . "KB <input type='checkbox'
name='deletethese[]' value='$filename'></td>";
$count ++;
if($count==5){
echo "</tr><tr>";
$count = 0;
}
}
echo '</table>';
echo '<input type="submit" name="delsubmit" value="Delete
Selected Images">';
echo '</form>';