Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Upload Image


000---000

Recommended Posts

Can somebody help as to how we can create a system where by a user can leave a review and add their own image at the same time? We've created the necessary database tables, having tried it in reviews and review_description, and can call an image once it is placed in the correct directory, but we cannot work out how to allow the user to attach and upload one image when they submit their review. It is very similar to adding a new product in the catalog surely...

 

This does leave us with a second problem of how do we limit the size of file and dimiensions of image, but we will work that out later... unless anyone knows a solution to that.

 

Thanks

 

Matt

oscommerce_community_forums.gif
Link to comment
Share on other sites

you could copy the code from the admin that deals with uploading files. There is also a contribution that allows customers to upload products (and so images are included) As of the file size check the $_FILES['userfile']['size'] array element contains the uploaded file size info.

Link to comment
Share on other sites

  • 2 weeks later...

Hi ive been trying to have this function also ive tryed the above but with no luck.

 

the image just wont upload and the image name is not placed in the database, tho there is no error message.!?

 

Please if anyone can help here i would be most greatfull im sure it cant be too hard to achieve.!

Link to comment
Share on other sites

Ok, basically, I create a page that uploads an image to a review_image directory, which works fine, how do I make that image name be written into the database table for the review ID?

If I manually put the image in the database I can call it back with the review.

oscommerce_community_forums.gif
Link to comment
Share on other sites

Join the conversation

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

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

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