pop-up aanmaken tijdens gegevens uit db halen
Ik heb een formulier gemaakt, met daarin de mogelijkheid om een plaatje toe te voegen, dit plaatje wordt opgeslagen in een map en vervolgens de titel en omschrijving van het plaatje in de database. nu heb ik het plaatje opgehaald uit die map en wil ik dus als je op het plaatje drukt dat je een pop-up krijgt met daar de omschrijving en de titel.
(Plaatje heeft een id en record ook in de database)
Kan iemand mij helpen?
(Plaatje heeft een id en record ook in de database)
Code (php)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<?php
ini_set('display_errors', 'ON');
error_reporting(E_ALL);
echo '
<table cellspacing="0" cellpadding="0" >
<tr>
<td>
<table cellspacing="0" cellpadding="5" width="100%">';
$image_types = array("jpg","gif","bmp","png","jpeg,JPEG.JPG,PNG.GIF");
$plaatjes_reeks = "";
$mapnaam = "/verkoop";
$map = opendir(".{$mapnaam}");
$count = 0;
while (false!==($bestand = readdir($map))) {
if ($bestand != "." && $bestand != "..") {
$ext = explode('.',$bestand);
$extl = sizeof($ext) - 1;
$ext = strtolower($ext[$extl]);
if ( in_array($ext,$image_types) ){
if($count%3 == 0) {
$plaatjes_reeks .= '</tr><tr>';
}
$plaatjes_reeks .= "<td><img height=75 src= \"verkoop/" . $bestand . "\" />
</td>";
$count++;
}
}
}
if ( $plaatjes_reeks != "" ){
echo ($plaatjes_reeks);
}
closedir($map);
echo '
</table>
</td>
</tr>
</table>';
?>
ini_set('display_errors', 'ON');
error_reporting(E_ALL);
echo '
<table cellspacing="0" cellpadding="0" >
<tr>
<td>
<table cellspacing="0" cellpadding="5" width="100%">';
$image_types = array("jpg","gif","bmp","png","jpeg,JPEG.JPG,PNG.GIF");
$plaatjes_reeks = "";
$mapnaam = "/verkoop";
$map = opendir(".{$mapnaam}");
$count = 0;
while (false!==($bestand = readdir($map))) {
if ($bestand != "." && $bestand != "..") {
$ext = explode('.',$bestand);
$extl = sizeof($ext) - 1;
$ext = strtolower($ext[$extl]);
if ( in_array($ext,$image_types) ){
if($count%3 == 0) {
$plaatjes_reeks .= '</tr><tr>';
}
$plaatjes_reeks .= "<td><img height=75 src= \"verkoop/" . $bestand . "\" />
</td>";
$count++;
}
}
}
if ( $plaatjes_reeks != "" ){
echo ($plaatjes_reeks);
}
closedir($map);
echo '
</table>
</td>
</tr>
</table>';
?>
Kan iemand mij helpen?
Gewijzigd op 07/10/2011 11:47:37 door Dirk Renes
Gesponsorde koppelingen:
Ik gebruik de Fancybox: www.fancybox.net
- Aar - op 07/10/2011 12:06:56:
Ik gebruik de Fancybox: www.fancybox.net
Oke, en hoe zorg ik dat hij dat een linkje naar dat aanmaakt en die tekst uit de db haalt die daarbij hoort
Die tekst geeft je mee in het alt-attribuut van de <img ...>.
Gewijzigd op 07/10/2011 12:19:43 door - Aar -
- Aar - op 07/10/2011 12:17:35:
Die tekst geeft je mee in het alt-attribuut van de <img ...>.
voorbeeld?
Kan iemand de post hierboven even verwijderen? Mijn dank is groot.
Heb hem al aangepast.



