Hi!
Im a noob to PHP but had to use it instead of ASP because I couldn't retrieve images from database using ASP + MS Access... Anyways.. I have couple questions:

Number 1: How to retrieve and displaymultiple(!) images(jpg) from mysql DB?

NUmber 2: I have a main page that displays iframe with multiple images (they are hardcoded for now). When pressing on any image it will redirect to a page with that image and text box for a comment..(thats the plan anyway) . And is it possible to disable redirect option if the user is not logged in (based on cookie)?
Thanks

<div class="img">

 <a target="_blank" href="klematis_big.htm"><img src="1.jpg" alt="Klematis" width="220" height="130" /></a>
 
</div>

<div class="img">

 <a target="_blank" href="klematis2_big.htm"><img src="2.jpg" alt="Klematis" width="220" height="130" /></a>
 </div>
 
<div class="img">

 <a target="_blank" href="klematis3_big.htm"><img src="3.jpg" alt="Klematis" width="220" height="130" /></a>
</div>

<div class="img">

 <a target="_blank" href="klematis4_big.htm"><img src="4.jpg" alt="Klematis" width="220" height="130" /></a>
</div>

<div class="img">

 <a target="_blank" href="klematis4_big.htm"><img src="5.jpg" alt="Klematis" width="220" height="130" /></a>
</div>

<div class="img">

 <a target="_blank" href="klematis4_big.htm"><img src="6.jpg" alt="Klematis" width="220" height="130" /></a>
</div>

<div class="img">

 <a target="_blank" href="klematis4_big.htm"><img src="7.jpg" alt="Klematis" width="220" height="130" /></a>
</div>

<div class="img">

 <a target="_blank" href="klematis4_big.htm"><img src="8.jpg" alt="Klematis" width="220" height="130" /></a>
</div>

<div class="img">

 <a target="_blank" href="klematis4_big.htm"><img src="9.jpg" alt="Klematis" width="220" height="130" /></a>
</div>

<div class="img">

 <a target="_blank" href="klematis4_big.htm"><img src="10.jpg" alt="Klematis" width="220" height="130" /></a>
</div>

Hi, I haven't done any work with images in a database, so I'm not much help to you there. As for your second problem, if you want to either enable or disable all of the links based on if the user is logged in, then I would make two separate pages, say links.php and no-links.php, and include links.php if the user is logged in and the other if the user is not logged in.

So when the user logs in, I would set a session cookie, say $_SESSION['logged-in']=yes, but it could be anything you want. Then for your include code, you could have:

<?php
    if($_SESSION['logged-in']='yes'){ //check to see if the session variable is set
        include_once('path-to-file/links.php'); //if it is, include the links file
    }
    else {
        include_once('path-to-file/no-links.php'); //else include no-links file
    }
?>

Put the code you have listed in two files - one with links, one without - and put the include script where it was.