Jump to content


This topic is now archived and is closed to further replies.


User upload Pic to Dir + DB

Recommended Posts

Hi there, still working on my site... and I am up to the final and hardest part :/

I have a section where users submit a journal with pictures for that journal. I have a journal search sytem by username and genres..--
Now, I want to be able to have a user upload a picture for a journal and have it upload the picture to a directory with the $journalname as prefix and incremental n.o as suffix. e.g (myadventure03.jpg). Then I want to add this label to the DB.

So that, when I click on a journal to view I can get it to display all pictures for that journal by a MYSQL search with journal (column) = $journalname for example...

I've looked around for tutorials on this and tried to do it myself but I am having a bit of trouble, any help would be greatly appreciated..


Share this post

Link to post
Share on other sites
FIND THE TUTORIAL ON phfreaks that tells u how to do it, i think that is ur best bet

Share this post

Link to post
Share on other sites
Hi well I've gone away and tried to use the tutorial but I am having no luck..

Here is my script:

<form action="makeajcom.php" method="post"><br>
Type (or select) Filename: <input type="file" name="uploadFile">
<input type="submit" value="Upload File">


move_uploaded_file ($_FILES['uploadFile'] ['tmp_name'],
      "../journalpics/{$_FILES['uploadFile'] ['name']}")


The directory journalpics is below the dir of these php files.. still... the files arent being uploaded into that directory..

Share this post

Link to post
Share on other sites


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.