Hello,
I'm posting again regarding as to why my php code won't process the delete.php
Index.php:
<div id="DeleteFile">
Delete A Script:
<form action="delete.php">
</html>
<?
$path = "uploads/";
$handle = opendir($path);
echo '<select>';
while ($file = readdir($handle)) {
if (substr($file,0,1) != ".") {
echo "<option value ='$file'>$file</option>";
}
}
echo '</select>';
closedir($handle);
?>
<html>
<input type="submit" action="delete.php"/></form>
</div>
</div>
</body>
</html>
So thats my Index page, and I can only assume it works as it takes me to url.co.uk/delete.php?
However, It doesn't actually delete the file.
Delete.php:
<html><link href="stylesheet.css" rel="stylesheet" type="text/css">
<head>
</head>
<body>
</html>
<?php
function delete() {
echo delete('$file');
echo "The file $file has been deleted";
}
?>
Sorry for bothering you guys, thanks.