AshleyQuick Posted December 3, 2008 Share Posted December 3, 2008 I've butchered this...I can't figure out how to implement the submit (Go) button for each. Can someone assist? <table align="center" bgcolor="#8BA5C5" border="0" cellpadding="4" cellspacing="0" width="760"> <form name="dodownload" method="post" action="download.php"> <tr> <td align="center"><strong>Download Backup</strong></td> </tr> <tr> <td align="center"> <?php $farr=array(); if (file_exists($url_base."_BACKUPS/")) { $dir= opendir($url_base."_BACKUPS/"); $fl = readdir($dir); while ($fl = readdir ($dir)) { if ($fl != "." && $fl != ".." && (eregi("\.gz",$fl))){ $farr[]=$fl; } } closedir($dir); } sort($farr); if (sizeof($farr) == 0) { ?> <p>No backup found </p> <?php } else { $i = 0; foreach($farr as $file) { ?> File to download: <input name="zipname<?php echo $i; ?>" type="text" value="<?php echo $file; ?>"><br> <?php } $i++; } ?> </td> </tr> <tr> <td align="center"> <input type="hidden" name="path" value="<?=$url_base;?>"> <input name="send4" type="submit" class="textbox" value="Go"> </td> </tr> </form> </table> Link to comment https://forums.phpfreaks.com/topic/135293-adding-submit-button-for-each-file-download-in-loop-statement/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.