Sean
Sean

Reputation: 1

Uploading files and making a directory with PHP

Not sure if anybody can/will answer this, I am just starting php programming and was wondering if someone can point me in the right direction. I want to have a page where you select and image to upload and you can specify a folder name, the script creates the folder and puts the image in that folder that was specified in the html form. i.e I upload john.jpg and I put in john as a folder name, so that when I go to get the image its in uploads/john/john.jpg . Any help would be usefull

Upvotes: 0

Views: 104

Answers (2)

das_weezul
das_weezul

Reputation: 6142

To create a directory: http://www.php.net/manual/en/function.mkdir.php

A nice tutorial on PHP uploads http://www.tizag.com/phpT/fileupload.php

Welcome on SO!

Upvotes: 2

k to the z
k to the z

Reputation: 3185

Sean, I wish someone had directed me to frameworks when I first started. It would have saved me all the hassle. Zend, CakePHP, Symphony are all good frameworks. I personally use Yii. It's a life saver.

Yii site

Go there, get the framework and read the documentation. It makes it all so much easier.

Upvotes: 0

Related Questions