Jump to content

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

Thanks,
Link to comment
https://forums.phpfreaks.com/topic/14459-user-upload-pic-to-dir-db/
Share on other sites

  • 2 weeks later...
Hi well I've gone away and tried to use the tutorial but I am having no luck..

Here is my script:


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






--makeajcom.php---
<?php

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

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.