View Full Version : pictures uploading but not showing up
muddysmurf
05-13-2009, 06:12 PM
I think this is a stupid question, but I can't figure out what I need to do to make it work. My images are being pulled from the database. My pictures are being uploaded and separating into the two sizes that I need. I have 2 different rows in my table - one for smallImg_used and the other for largeImg_used.
How do I - after the images are uploaded to the folder- make the images point to those different rows in the table and show on the page? When I insert a record, it shows my name and description as I inserted, just not my images that I uploaded. The fields are actually blank. I even named the id and name after the row name. I've also tried playing around with the lighting bolt inside the actual dfp configuration.
I'm using php and mysql. I also used the DataAssist wizard to create my results/insert/update/delete pages. I deleted the text field for my thumbnail and inserted a file/upload input type and then put the dfp2 upload to it.
Thanks for any help!
fragop363190
05-14-2009, 12:59 AM
First of all I suppose you mean you got 2 columns in your MySQL DB one for big image and one for thumbnail.
You got 2 upload behaviors or u using multiple image thing to produce the 2nd image?
Are you sure both image filenames are in your database and files in server?
Lastly if all the above are correct, in order to show the images you insert an image placeholder where you want the image to show up, bind that column to it and lastly do not forget to add the path to the src of the image placeholder since your db has only the filename in it and not the path.
Please give more exact details of what you have done so I can help you further cause you are not giving enough info.
Which page you deleted the thumbnail? and why only thumbnail? you got 2 columns so you need 2 upload behaviors.
muddysmurf
05-14-2009, 07:00 AM
I meant columns. I was half asleep writing that last night since I had been working on that project for a while. My table is called used. I have columns inside that table called Name, Description, smallImg_used, largeImg_used.
I have a recordset on my used inventory page that is calling out this Used table, and posting all of the inventory, newest first on this page.
Now, I used DataAssist to create the backend for the client to upload used inventory, instead of me. I have a results, Insert, Delete, and Update page for this.
Now, I went to the insert page, and first went to the thumbnail (smallImg_used) text field. I deleted that, and inserted an upload input field. I then added the DFP2 Upload server behavior. I have the DFP2 making two images out of the one picture uploaded (hoping that the client only has to upload this same image one time).
The pictures are going into an image folder once created. Just NOT listing as text inside the database column. Hence the reason it's not showing up live.
Now, when I got to insert used inventory, I put in a Name, Description, and upload an image. It inserts this into my database..sorta. I places the Name in the Name column, the description into the Description column, but it doesn't place the image / or image name into my small and large image columns.
Inside the actual page, I have the img src="../images/imagecache/<whatever the php sql from the recordset is here to call out the image for the respective small and large>
I would think this would work...since if I hadn't set the upload input field here, if i had of left it text, and actually wrote picture_thumb.jpg and picture_large.jpg inside the text field and hit insert, then uploaded the image to the folder, I wouldn't have any problem because thats the way i've been doing it before I started to create the backend.
Like I said, it's uploading the two images. There just seems to be something missing to keep it from listing the picture_thumb.jpg and picture_large.jpg inside the respective columns in the database.
Ray Borduin
05-14-2009, 09:24 AM
Your logic seems correct. Have you looked at the source code to see what might be wrong with the image source when browsing and it doesn't work. That is where I would start.
muddysmurf
05-14-2009, 09:38 AM
i've looked at it over and over again, but can't seem to find anything wrong with it. I kept looking at the forms id and name and they are the same as the columns in the table. I've also looked at the code dfp2 puts in the page also, and everything seems right there.
it's really frustrating lol
Ray Borduin
05-14-2009, 09:51 AM
Do you have a url where I can view the problem?
muddysmurf
05-14-2009, 10:06 AM
Try these. I'll change the link names later.
Links PM'd to you.
I think that's a good version. I didn't upload anything else last night, since i'm working local on the problem.
Ray Borduin
05-14-2009, 10:14 AM
I'm a little confused by your form.
You have one upload field and then a text field. What do you expect in that field? imagename.jpg?
Then when I insert the image name doesn't appear in the thumb field.
So the issue seems to be updating the database with the proper file name of the uploaded file.... am I correct?
This is probably a problem with your insert server behavior. What do you have the field for thumbs set to?
muddysmurf
05-14-2009, 10:24 AM
I haven't deleted the large text box yet, due to I was trying to make it work where the client only had to insert the one image, and then dfp resized the image to the size I needed it to be.
"So the issue seems to be updating the database with the proper file name of the uploaded file.... am I correct?"
I believe that's the problem. I mean it's updating the database with whatever I want the text fields (name and description) to be..just not adding the file name of the image that was uploaded to my smallImg_used and largeImg_used columns in my database. Even the results page should show something, and it's set to throw out the imagename.jpg but since the insert isn't giving the file name to the database, it doesn't know to put anything. But the image uploads lol
As for the thumb field:
<?php echo ((isset($_POST["smallImg_used"]))?$_POST["smallImg_used"]:""); ?> Type is still set to Text.
I watched the video again for DFP1 and it said to change that, but for asp users only. But I tried changing it anyway, don't remember to what, but it still didn't work.
muddysmurf
05-14-2009, 10:30 AM
update: I just copied the WADAused recordset from another page, clicked the lighting bolt, and under recordset (WADAused) and clicked smallImg_used but it inserted the wrong file name of the image that I updated. It actually updated the image with another image from the database... hmmm
maybe a fluke
Ray Borduin
05-14-2009, 10:42 AM
Use the lighning bolt for the thumb field and browse to the bindings for the uploaded file. You will find a "Server File Name" option... I think you want to use that.
muddysmurf
05-14-2009, 10:51 AM
Alright, i think I got it to work using the server file name.
I ended up having to choose the ../images/filename_large server file name
and then the thumbnail version of the file name.
Do you want me to start a new post on exactly what I did and how I got it to work? I'll try my best to make it understandable lol
This might help people trying to do the same thing as me.
vBulletin® v3.8.1, Copyright ©2000-2012, Jelsoft Enterprises Ltd.