php image upload

Hi Experts,

I am fairly new to this...

I have got this php script from http://www.webmotionuk.co.uk/php-jquery-image-upload-and-crop/

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!
maccaj51Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

maccaj51Author Commented:
0
Ray PaseurCommented:
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 PHP.net web site has good instructions that teach how to upload an image and information from a form.
http://www.php.net/manual/en/features.file-upload.php
http://www.php.net/manual/en/features.file-upload.post-method.php
http://www.php.net/manual/en/features.file-upload.errors.php
http://www.php.net/manual/en/features.file-upload.common-pitfalls.php
http://www.php.net/manual/en/features.file-upload.multiple.php

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.
http://www.php.net/manual/en/function.md5.php

3. After the file is uploaded and the unique name is generated, you need to put it some place for permanent storage.
http://www.php.net/manual/en/function.move-uploaded-file.php

HTH, ~Ray
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
maccaj51Author Commented:
Thanks Ray that helped alot!
0
Ray PaseurCommented:
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
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
PHP

From novice to tech pro — start learning today.