vidyashankara Posted June 12, 2006 Share Posted June 12, 2006 I have 2 php files. The first one writes a few text files and saves them.The second page need to open these pages again. How do i define the files that are saved? The number of files saved in each session may vary.For eg.the first page displays [code]The following PDB files have been generated:2a01_a.pdb2a01_b.pdb2a01_c.pdb2a01_AC9.pdb2a01_HOH.pdbGenerate Input(link to 2nd page)[/code]How do i tell the 2nd page to open the above files? Right now, I have checkboxes for every file to submit the value of the file. But is it possible to hide the checkboxes? They must not show up...ThanksVidyashankara Quote Link to comment https://forums.phpfreaks.com/topic/11798-html-form-help/ Share on other sites More sharing options...
Buyocat Posted June 12, 2006 Share Posted June 12, 2006 If you want to open the files use fopen:[a href=\"http://us3.php.net/fopen\" target=\"_blank\"]http://us3.php.net/fopen[/a]In order to know what the filename is you'll want to create the file then perhaps set each file name to an array and pass that array in session data. Then on the next page you search for that session data and open the files. Quote Link to comment https://forums.phpfreaks.com/topic/11798-html-form-help/#findComment-44725 Share on other sites More sharing options...
d_barszczak Posted June 12, 2006 Share Posted June 12, 2006 Not sure what your saying but if your not sure how many files are going to be generated by the previous script you can put the generated filenames in an array with something similar to the following.Just rember this will grab every file in the folder of $path.[code]$path = "/path/to/your/files/";if ($handle = opendir($path)) { while (false !== ($file = readdir($handle))) { if ($file <> "." and $file <> "..") { $dir[$I] = "$file"; $I++; } } closedir($handle); }[/code] Quote Link to comment https://forums.phpfreaks.com/topic/11798-html-form-help/#findComment-44753 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.