Jump to content

Silver

New Members
  • Posts

    6
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

Silver's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Thanks :) I thought it would've been asked before so I did do a search but there were so many results to wade through, I did start but couldn't find what I was after so I thought it'd be quicker to ask! I half solved my problem - now the file names are going into the database but only as their filename, not as the path - which, as they're in a subdirectory, means I have to do images/$file which isn't a problem from my point of view as long as it won't cause any problems? Plus it isn't actually what I wanted to do - get the path in the database! But if it works for displaying images on another page (which it seems to) it's fine... The images aren't being renamed upon uploading, what do I need to do to fix that? Also is there a way of restricting image size as in pixels as well as kbs? If so what do I need to do? Thanks again :)
  2. Hi, I am working on a script which inserts text fields into a database and also uploads an image into a directory with the same form. The text fields insert fine and the image uploads, but I can't get the image path into the database. The closest I've come is getting it to do a /tmp/php2308jhl kind of thing. I've just picked up this project again after a couple of years and most of my knowledge has deserted me so I'm fumbling about in the dark rather. How do I get it to put the path into the database? Also, after I've sorted this I also want to be able to upload two different files using the same form, what do I need to do to allow multiple file uploads? Thanks!
  3. I\'m making a script which involves people uploading files. Each person will be uploading a file and a picture of the file. Now, if someone comes to upload their file but there\'s already a file with the same name uploaded it mustn\'t be allowed to overwrite. What I need it to do is for the database to automatically allocate an id number or something to the picture and a seperate one for the file, so if a file or picture of the same name is uploaded it would prevent them clashing. The only thing I can think of which may be a problem is the files will be being downloaded, so the original name they were uploaded as (eg Amber.pet) must be restored when they\'re downloaded. Hopefully that made sense! Please explain in a simple way as I\'m still quite a newbie to php
  4. Ok, let\'s start at the beginning, I\'ve never done this before and am still quite a newbie to php Ok, how do I do that? Good Now I just need to learn how I have the right theory then, if I can just learn how to put it into practise it should be great! Which update? And how do you mean an intermediate page? Thanks for your help
  5. You did export structure and data not just structure?
  6. Hello! I\'m trying to make a script where users can upload their files, but the files they upload can only be downloaded X amount of times. After they\'ve been downloaded so many times in an ideal world they\'d be automatically removed, though just to be made so people couldn\'t download them anymore would be great. I\'ve made the upload part, I was told the best way would probably be to - 1. Store the files in a database and have a field that has a value that is how many times it can be downloaded. 2. Then a page that allows users to download. 3. For each download you can decrement that download field by one. 4. When you display the link for all the download files you can display all the downloads that do not have your available download field = 0... Either could I have some help in how to store files in a mySQL database, or could you advise me of a better way to do this please? Thanks!
×
×
  • 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.