php image upload

Posted on 2011-10-08
Last Modified: 2012-05-12
Hi Experts,

I am fairly new to this...

I have got this php script from

I have made some modifications to the form at the bottom of the attached file.

I would like to do the following...

1) generate a unique id in the unique id field
2) upload the form results to 'gallery' table
3) rename and upload the image with the 'unqiue id' as the filename

can any one help me please! im tearing my hair out!
Question by:maccaj51

    Author Comment

    LVL 107

    Accepted Solution

    This is really three questions.  I doubt if I can work on your code but here are some ideas that may help you get started.

    1.  The web site has good instructions that teach how to upload an image and information from a form.

    2. You can generate a unique name by using the md5() digest of the image file.  You might also associate it with the date and time, or the client who uploaded the file.

    3. After the file is uploaded and the unique name is generated, you need to put it some place for permanent storage.

    HTH, ~Ray

    Author Closing Comment

    Thanks Ray that helped alot!
    LVL 107

    Expert Comment

    by:Ray Paseur
    Thanks for the points - it sounds like an interesting application.  There are a lot of moving parts here, but if you go at it one step at a time you'll get great results. ~Ray

    Featured Post

    Maximize Your Threat Intelligence Reporting

    Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

    Join & Write a Comment

    Suggested Solutions

    Introduction HTML checkboxes provide the perfect way for a web developer to receive client input when the client's options might be none, one or many.  But the PHP code for processing the checkboxes can be confusing at first.  What if a checkbox is…
    Developers of all skill levels should learn to use current best practices when developing websites. However many developers, new and old, fall into the trap of using deprecated features because this is what so many tutorials and books tell them to u…
    Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
    The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

    754 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now