PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
it doesent...it looks as though it will but when you hit submit nothing prints to the screen...should i put a get in somewhere or return the value of something.....i dont get any errors....it just doesnt work
was to get rid of the annoying .,.. at the beginning, the if statement moreso checks to see what file is selected and post the value of whatevers selected in the xyz array....and how come you didnt get any errors for not putting \'s where it says selected
i know that isset checks to see whether a variable exist...which has me a bit confused....did you put a nested if inside the option tag?
another question....say if i changed dirname to be the value of xyz after this has executed....would it give an error....how could i post the value of xyz to the end of dirname?
PHP_EOL is a core constant that is defined as the local file system's carriage return, be it \r\n, \n or \r.
The str_repeat() call was to make adding multiple tabs as indentation a bit easier for later modification for whatever reason.
The latter quoted snippet contains several different things. You are correct in guessing the initial if strips out the . and .. directories; inside the echo line there is a ternary, which is used in combination with checking that there is a submission value to check against and adding a preselection if the posted value matches the current record.
As for adding navigation logic, on the most basic level it would simply be concatenating the submission directory to $dirname. There are security bits to consider however, such as making sure this new directory is still under the original so someone isn't able to navigate outside of the tree which you've set up.
ok....ive managed to do something along the lines of what i wanted to do...exept....it puts the info in the next folder in the same <select>....get this
i hate it...its like one of those times you screw up and figure out what you did and at the same time not knowing what you did....AHHH!!!.....i think i know what i did and im gonna test something
ok....ive gotten to the next step....but i get this as an error
Warning: readdir(): 2 is not a valid Directory resource in C:\Program Files\xampp\htdocs\Log_In\agent\resid_report.php on line 27
also it doesnt print the entire contents of the folder of the first folder but it shows the contents of the one when you pull it up in the second folder shows the indentation but it doesnt print in the <select>
sweet...worked like a charm...thanx feyd.....one more question though....after you get inside the last folder that actually contains files it says Invalid directory specified.....how do i get it to show the files in that folder and when the user selects that one....to actually open that file i tried this
no errors....xept it says Invalid directory specified....i know why....the if statement is doing either or...it feels as though im on the right track but....
ok...i set the filename for ['xyz'] which is cool....only one thing...it needs to look for folders as well as files
you mean like if the user selects a folder not only does it concatenate whatever the value of xyz is but it echos a new select with xyz's content in that select?
i tried that...i couldent figure how to echo a new one on submission without calling errors....ill try again now though