I have some php, html and JS code:
$files = getDirectoryList("/home/uploads/");
foreach($files as $file)
{
?>
<input type="submit" onclick="writetofile("<?php echo $file; ?>")" value="Work " />
<?php
echo $file;
}
When I click on "Work" the writetofile doesn't get called which is defined at top in HTML head tag script. Why?