de bedoeling was om een foto weer te geven als deze bestaat en als deze niet bestaat een standaardfoto weer te geven. helaas werkt dit niet
.
Het is wellicht een heel simpel probleem maar we komen er niet achter.. directorys kloppen 100% zeker
EDIT: Code veranderd...
Het is wellicht een heel simpel probleem maar we komen er niet achter.. directorys kloppen 100% zeker
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
| <html> <head> <title>***** Occasions</title> </head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <link href="http://www.eenautobedrijf.nl/opmaak.css" rel="stylesheet" type="text/css"> <body> <?php include "../config.inc.php"; $sqlquery = "SELECT * from occs WHERE Id = '$linkId'"; $resultaat = mysql_query($sqlquery) or die ("Helaas, er is een fout opgetreden bij het weergeven van de frontpage..."); while ($obj = mysql_fetch_object($resultaat)){ ?> <table width="91%" border="0"> <tr> <td width="53%" height="375" ><br>[img]"<? $foto[/img]Id; $filename = "/Testmap/Occs/$foto.JPG"; if (!file_exists($filename)) echo "/Testmap/Occs/geenfoto.JPG"; else echo "/Testmap/Occs/$foto.JPG" ; ?> " width="500" height="375"></td> <td width="47%" align="left"> <table width="100%" border="0"> <tr> <td width="20%"><B>Merk:</B> </td> <td width="80%" align="left" valign="top"><?php echo "$obj->Merk"; ?> <?php echo " $obj->Type"; ?></td> </tr> <tr> <td width="20%"><B>Motor: </B></td> <td width="80%" align="left" valign="top"><?php echo "$obj->Cc"; ?></td> </tr> <tr> <td width="20%"><B>Brandstof: </td> <td width="80%" align="left" valign="top"><?php echo "</B>$obj->Brandstof"; ?></td> </tr> <tr> <td width="20%"><B>Geschakeld: </B></td> <td width="80%" align="left" valign="top"><?php echo "$obj->Geschakeld"; ?></td> </tr> <tr> <td width="20%"><B>Kilometers: </B></td> <td width="80%" align="left" valign="top"><?php echo "$obj->Kilometers"; ?></td> </tr> <tr> <td width="20%"><B>Bouwjaar: </B></td> <td width="80%" align="left" valign="top"><?php echo "$obj->Bouwjaar"; ?></td> </tr> <tr> <td width="20%"><B>Kleur: </B></td> <td width="80%" align="left" valign="top"><?php echo "$obj->Kleur"; ?></td> </tr> <tr> <td width="20%"><BR></td> <td width="80%" align="left" valign="top"><BR></td> </tr> <tr> <td width="20%" height="40" align="left" valign="top"><B>Extra's: </B></td> <td width="80%" align="left" valign="top"><?php echo "$obj->Extra"; ?> <?php } ?> </td> </tr> </table> </td> </tr> </table> </body> </html> |
EDIT: Code veranderd...
[ Voor 130% gewijzigd door nore1g1 op 24-03-2003 15:10 ]