Jump to content


User upload Pic to Dir + DB

  • Please log in to reply
2 replies to this topic

#1 BaconBeast321

  • Members
  • PipPip
  • Member
  • 23 posts

Posted 13 July 2006 - 09:46 AM

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..


#2 brown2005

  • Members
  • PipPipPip
  • Advanced Member
  • 943 posts

Posted 13 July 2006 - 09:49 AM

FIND THE TUTORIAL ON phfreaks that tells u how to do it, i think that is ur best bet

#3 BaconBeast321

  • Members
  • PipPip
  • Member
  • 23 posts

Posted 23 July 2006 - 01:31 AM

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..

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users