Jump to content

[SOLVED] File managment system


zipp

Recommended Posts

Im trying to make a File managment system, I have gotten the files to display properly, now what I am trying to do is have a check box next to each file, that if clicked, when the form is submitted, the file will be deleted. I would like to be able to have more then 1 check box selected.

 

html code (generated by php)

<form enctype='multipart/form-data' method='POST' id='del' action='delete.php'>
<input type='submit' value='Delete'></th>
                <tr><td colspan="2"><a href="/admin/admin-xxky.php?dir=upload/jackie">jackie</a></td>
                </tr>
                <tr>
                    <td>-->aloud.wav</td>

				<td style="padding-left:40px;"><input type="checkbox" name="delete"></td>
                </tr>
                <tr>
                    <td>-->howto.txt</td>
				<td style="padding-left:40px;"><input type="checkbox" name="delete"></td>
                </tr>
                <tr>
                    <td>-->readme.txt</td>

				<td style="padding-left:40px;"><input type="checkbox" name="delete"></td>
                </tr>
                <tr><td colspan="2"><a href="/admin/admin-xxky.php?dir=upload/test2">test2</a></td>
                </tr>
                <tr>
                    <td>-->New Text Document.txt</td>
				<td style="padding-left:40px;"><input type="checkbox" name="delete"></td>
                </tr>

                <tr><td colspan="2"><a href="/admin/admin-xxky.php?dir=upload/test">test</a></td>
                </tr>
                <tr>
                    <td>-->New Flash ActionScript File.as</td>
				<td style="padding-left:40px;"><input type="checkbox" name="delete"></td>
                </tr>
                <tr>
                    <td>-->New WinRAR ZIP archive.zip</td>

				<td style="padding-left:40px;"><input type="checkbox" name="delete"></td>
                </tr>
                <tr><td colspan="2"><a href="/admin/admin-xxky.php?dir=upload/tom">tom</a></td>
                </tr>
                <tr>
                    <td>-->aloud.wav</td>
				<td style="padding-left:40px;"><input type="checkbox" name="delete"></td>
                </tr>

                <tr>
                    <td>-->howto.txt</td>
				<td style="padding-left:40px;"><input type="checkbox" name="delete"></td>
                </tr>
                <tr>
                    <td>-->readme.txt</td>
				<td style="padding-left:40px;"><input type="checkbox" name="delete"></td>
                </tr></table>

 

 

 

delete.php code

<?php
if ($_REQUEST['delete']) {
unlink($_REQUEST['delete']);
}
?>

 

Link to comment
https://forums.phpfreaks.com/topic/62263-solved-file-managment-system/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.