if i upload 27 files to a directory, how do i create a PHP code to ask it to pull the first 9 into one document, the second 9 into the next document and the last lot of 9 in a third document? i'm assuming it's possible...
The official php.net website is very useful. Googling around it is the best way, I think.
Google for "site:PHP: Hypertext Preprocessor [keywords]" and you'll only get results from php.net (if you didn't already know). But if you're not sure what functions you need, but you kind of know what you want to do, try searching in really basic English. In the above example, you could have searched
@Jazajay: i dunno what you mean Jaz, sorry! Do you mean like each link different per user, which could mean they could pull in all kinds of files? It'd be a product page with 9/16 small images, and I don't want to have to name them each time, but just pull them in.
@Phil: I'm using this so that I can just upload a few images to a directory and the page automatically pull it in, instead of me having to link each one in at a time. There's 300 products on the site so it's just trying to make the job smaller.
Yeah exactly if you allow the user to change the file path, they can then pull any file off the server, ie: db passwords, this is obviously something you don't want them to do.
To circumvent it I would use the basename() function as this function makes sure that any file path that is added is trimmed off.
So in the above example it would be safer to write ~ <?php
I really, really respect that you want to teach yourself, IMO the only true way to learn, but always think how can this be exploited, because if you can think of 1 way so can a hacker, trust me from experience.