webForumDet fria alternativet

Bild på sidan utan att skapa fler

PHP

2 svar · 154 visningar · startad av bymarie

Medlem sedan aug. 20022 436 inlägg
Frågan#1

Varför funkar inte detta?
Det blir bara samma bild som laddas fram hela tiden (start.jpg)

<table><tr><td>
<table width="662" bgcolor="white" cellpadding="11" cellspacing="0" border="0">
<tr>
       <td>
<? if ($_GET['bild'] == "01") { ?> 
<img src="photos/01.JPG" width="640" height="480" alt="" border="0">

<? } elseif ($_GET['bild'] == "02") { ?> 
<img src="photos/02.JPG" width="640" height="480" alt="" border="0">

<? } elseif ($_GET['bild'] == "03") { ?> 
<img src="photos/03.JPG" width="640" height="480" alt="" border="0">

<? } elseif ($_GET['bild'] == "04") { ?> 
<img src="photos/04.JPG" width="640" height="480" alt="" border="0">

<? } elseif ($_GET['bild'] == "05") {  ?> 
<img src="photos/05.JPG" width="640" height="480" alt="" border="0">

<?  } else { ?> 
	   <img src="photos/start.JPG" width="640" height="480" alt="" border="0">

<? } ?>

</td>
</tr>
<tr>
       <td height="4" background="bg.bmp"></td>
</tr>
<tr><td><a href="default.php?bild=01">01</a>&nbsp;<a href="default.php?bild=02">02</a></td></tr>
</table>
</td>
</tr>
</table>
Medlem sedan aug. 20022 436 inlägg
#2

Ingen som vet?

Medlem sedan aug. 20011 099 inlägg
#3

är du säker på att $_GET['bild'] får värden?
skriv ut det med

echo $_GET['bild'];

271 ms totalt · 4 externa anrop · v20260731065814-full.86ec41c2
125 ms — deklarationer (db)
0 ms — hämta statistik (cache)
141 ms — hämta tråd, inlägg och bilagor (db)
127 ms — ändringar (db)