Hi
at first i apologized for my English writing
i want to delete file uploaded
when i see a record , i put a line in bottom of fields
[attachment=0]delete_file.jpg[/attachment]
i write this code in administrator/components/com_chronocontact/admin.chronocontact.html.php
<?php
if ($table_field_title == "file_2" ) { $temp= $row->$table_field ; }
?>
<tr><td>Delete File</td>
<td>
<?php
if(isset($_POST['submit'])) {
$uploadpath = JPATH_SITE.DS."components".DS."com_chronocontact".DS.'uploads'.DS.$row->name.DS.$temp;
JFile::delete($uploadpath);}
?>
<form action="<?=$_SERVER['PHP_SELF'];?>" method="post">
<input type="submit" name="submit" value="Click Here to delete File">
</form>
</td></tr>
But This Code doesn't work
Please Help me How to delete file uploaded ?
at first i apologized for my English writing
i want to delete file uploaded
when i see a record , i put a line in bottom of fields
[attachment=0]delete_file.jpg[/attachment]
i write this code in administrator/components/com_chronocontact/admin.chronocontact.html.php
<?php
if ($table_field_title == "file_2" ) { $temp= $row->$table_field ; }
?>
<tr><td>Delete File</td>
<td>
<?php
if(isset($_POST['submit'])) {
$uploadpath = JPATH_SITE.DS."components".DS."com_chronocontact".DS.'uploads'.DS.$row->name.DS.$temp;
JFile::delete($uploadpath);}
?>
<form action="<?=$_SERVER['PHP_SELF'];?>" method="post">
<input type="submit" name="submit" value="Click Here to delete File">
</form>
</td></tr>
But This Code doesn't work
Please Help me How to delete file uploaded ?