Forums

This topic is locked

default image if none uploaded

Posted 08 Oct 2003 12:06:02
1
has voted
08 Oct 2003 12:06:02 richard thomas posted:
Hi,
I have used aspUpload to create a page that uploads image and database details, this works fine.

I want to be able to specify a default image if one isn't uploaded. I have disabled 'file required' and created a default path in my database field, but when I submit the page without using the file upload part, it overwrites the database default image.

Can anyone help me resolve this, I'm using Access 2000 and ASP (VB).

Many thanks.

Replies

Replied 08 Oct 2003 12:57:19
08 Oct 2003 12:57:19 Wayne Hultum replied:
Hi Richard,

Here's how I've do what you want. I'll see if I can explain.

I haven't put the the path to the image in the database I've put it in the upload page, look for this line in upload page

MM_columnsStr = "what ever the string is"

within the string you should have something that look like this '|field name|',none,' '

in my case the field name is wanted_img, put the image in in like this, wanted_img|',none,'<b>generic.gif</b>'

then make sure you have the generic.gif in the image for uploaded images.

I know i haven't explained this very well but it might help you.

if you need anything clearing up, post back and i'll see if i can explain better.
Replied 08 Oct 2003 13:15:55
08 Oct 2003 13:15:55 richard thomas replied:
Hi Wayne,
Thank you very much for that, I was in the middle of about 10 lines of VB to solve the problem on each image display page. You've saved me probably hours ! Cheers.
Replied 21 Aug 2008 06:36:49
21 Aug 2008 06:36:49 Bernie Zuecker replied:
Just reading through your topic, and this seems to be just what I need, only i am using pure php upload and a mysql database with php. i have the same problem but can't seem to find an answer for php & mysql. can you please help. Thanks

Reply to this topic