000---000 Posted August 4, 2006 Share Posted August 4, 2006 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 Quote Link to comment Share on other sites More sharing options...
Guest Posted August 4, 2006 Share Posted August 4, 2006 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. Quote Link to comment Share on other sites More sharing options...
phantompressents Posted August 16, 2006 Share Posted August 16, 2006 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.! Quote Link to comment Share on other sites More sharing options...
000---000 Posted August 21, 2006 Author Share Posted August 21, 2006 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.