I have the following form:
<form action="download.php" method="get">
<input type="checkbox" name="file1" /> File1 <br/>
<input type="checkbox" name="file2" /> File2 <br/>
<input type="checkbox" name="file3" /> File3 <br/>
<input type="checkbox" name="file4" /> File4 <br/>
<input type="checkbox" name="file5" /> File5 <br/>
<input type="submit" name="mysubmit" value="Download!">
</form>
I cant then GET the ticked value:
<?php echo $_GET["file1"]; ?>
Gives the result: on
However want I want to be able to do is select those options, and each option relates to a PHP file, on Submit each file is combiled into a ZIP
Any help appreciated.
First, add a value field to your form fields and change them to an array:
Next, in download.php: