pictures in access

Results 1 to 2 of 2

Thread: pictures in access

  1. #1
    Join Date
    Dec 1969

    Default pictures in access

    Hi,<BR>Can anyone tell me if its possible to load pictures from a database, just as you would load a profile of text to a web page?<BR>Also, I&#039m having some security problems. I need to know how to secure a script so that I can prevent people from copying and pasting the url. its a login script.<BR>Thanx<BR>Lucy

  2. #2
    Mark Parter Guest

    Default RE: pictures in access

    One way to do it is to store the name of the image in a field and then just reference this image on the page as follows:<BR><BR>strImage = rst("filename")<BR><BR>Response.Write "&#060;img src=../images/" & strImage & " alt=""This is an image""&#062;"<BR><BR>I&#039m not sure if I understand the second part, what I think you mean is if somebody copies the URL of a page after logging in then the next time they can just paste the URL into the browser instead of logging in.<BR><BR>If this is what you mean then you would have to write a session variable which is assigned a certain value once the user logs in. You can then include a file on every page that you want protected. This include file will check the session variable for the correct value. If they have logged in then the value will be correct, if they have just pasted the URL into the browser then no value will be assigne to the variable and you can just redirect them to the login page.<BR><BR>Try this url to see what I mean, it should take you to a list of courses but because you have not logged in yet it redirects you to the login page.<BR><BR><BR><BR>Hope this helps

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts