this is an index.php
<form action="verify.php" method="post" target="_blank">
<input name="filename" type="hidden" value="media.mp4"><p></p>
<input name="filesize" type="hidden" value="10 MB">
<div align="center">
<input alt="Download" src="download.png" type="image" width="225">
</div>
</form>
this is an verify.php
<meta http-equiv="refresh" content="5; url=download.php?file=<?php echo $file; ?>">
this is an download.php
<?php
$file = $_GET['file'];
header('Content-type: video/mp4');
header('Content-Disposition: attachment; filename="uploads/' . $file . '"');
?>
And the media files are stored in uploads directory this code need to force mp4 to download unfortunately it is not downloading from correct path.
this is the output in console: /download.php?file=media.mp4".
in order to make it work it should be /uploads/media.mp4 ... please help! tell me what im doing wrong?