I'm new in all this. I work only from what i found on the internet.
I have a image gallery ( [http://adau.ga/peisaje.php] ) witch, true php displays informations from mysql data base. This is my .php file scrips:
<html>
<head>
<title>Peisaje</title>
<a href="#portfolio" onclick="galerie()"><h2>Peisaje</h2></a>
</head>
<body>
<br>
<?php
try {
include 'http://adau.ga/conect.php';
$interogare = $cnx->prepare("SELECT * from silvia_poze WHERE id_categorie = 1");
$interogare->execute();
foreach ($interogare->fetchAll() as $linie) {
$img = $linie["poza_mare"];
$id = $linie["id_produs"];
$nume = $linie["titlu"];
echo '<a href="http://adau.ga/element.php?idprod='.$id.' "class=\"buchet_mic\"><img src="images/'.$img.'" height="250" width="250" alt=""/></a>';
}
}
catch(PDOException $e) {
die("Conectare imposibila: " . $e->getMessage());
}
?>
</body>
</html>
This is set to open a new php file (element.php) where is displayed the information i need.
Now, i want when click on the picture to open it with fancyBox simple gallery.
I have already imported the scripts and it works if i use only html ([http://adau.ga/fancy/demo/index.php] ), but i need fancyBox to display only thous pictures that have id_category = 1
in mysql