Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Setting images from a mysql db as background images

Guest
Nov 16, 2011 Nov 16, 2011

I have a simple question. How do you set mysql image results as background images. I already know how to display images from a mysql db so know need to explain that process. I also know how to set images as backgrounds using css. However setting mysql results as background images is a different process.  I need to know this because I'm creating a image gallery and I don't want people dragging images off the page, thanks in advance.

TOPICS
Server side applications
1.5K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Nov 16, 2011 Nov 16, 2011

I need to know this because I'm creating a image gallery and I don't want people dragging images off the page

That will not prevent users from obtaining your images through alternative methods.

best,

Shocker

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Nov 16, 2011 Nov 16, 2011

You can try the methods discussed in this thread: http://www.daniweb.com/web-development/php/threads/160935

>I need to know this because I'm creating a image gallery and

>I don't want people dragging images off the page, thanks in advance.

Why bother? As shocker says, there a plenty of other simple methods people can use to get your images - if they're displaying on the visitors PC they've already been downloaded.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Nov 16, 2011 Nov 16, 2011

I know people can simply right click and view background images, but I also know allot people who aren't as browser savy won't. thanks for the link.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Nov 16, 2011 Nov 16, 2011

I also know allot people who aren't as browser savy won't.

They aren't the ones you need to worry about anyhow....

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guru ,
Nov 17, 2011 Nov 17, 2011

You can put an image in a table cell as a background image, then put a 1x1 pixel transparent image in the cell and size it to the image size. Then when someone right clicks, all they can get is the transparent image. What they can still do, however, is take a screen shot.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Nov 18, 2011 Nov 18, 2011

Or look at the code.  Sheesh!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Nov 18, 2011 Nov 18, 2011

Or download from Activity window in Safari.

best,

Shocker

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Nov 18, 2011 Nov 18, 2011
LATEST

Better yet - or from the Web Developer interface in Safari, or Firebug in FF.  I'm now curious what it is about these images that would make people want to grab them!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines