owke ik heb mijn huiswerk gedaan hehe...
ik heb testtest.php aangemaakt, hierin staat
foto12.htm en foto11.htm bevatten html (voor de layout en wat javascript (de foto function die in het script hierboven gebruikt word)
zoals je ziet doet hij include ('1.php')
in 1.php staan de variables, hier is 1.php:
in 1.php (hierboven) staan de "p-variables" voor de pics en de "t-variables" voor de thumbnails...zo heb ik dus ook 2.php daarin loopt het van 51 t/m 100, 3.php loopt dan van 101 t/m 150 etc. (i think you get the point)...
dus nu staat er nog in testtest.php (zie bovenaan) als img src steeds fotos/1.jpg maar dat moet dus fotos/$t1.jpg enzo worden (alleen werkt dat zo niet), hoe moet dat dan?...
verder wil ik dan nog dat i.p.v. include ('1.php'), dat als je naar testtest.php?id=1 gaat, dattie dan 1.php include, als je naar testtest.php?id=2 gaat, dattie dan 2.php include...etc. kan iemand mij hier mee helpen dan?
p.s. ik vind dat ik het nou wel verdiend heb, want ik heb zelf er veel moeite voor gedaan en dingen gezocht en geleerd
ik heb testtest.php aangemaakt, hierin staat
PHP:
1
| <?include ('foto11.htm');include ('1.php');echo "<td width='194' align='right'><a href='javascript:foto('fotos/','100','100');'>[img]'fotos/thumbnails/tn0.jpg'[/img]</a></td> <td width='102' align='center'><a href='javascript:foto('fotos/','100','100');'>[img]'fotos/thumbnails/tn0.jpg'[/img]</a></td> <td width='102' align='center'><a href='javascript:foto('fotos/3.jpg','100','100');'>[img]'fotos/thumbnails/tn3.jpg'[/img]</td> <td width='102' align='center'><a href='javascript:foto('fotos/4.jpg','100','100');'>[img]'fotos/thumbnails/tn4.jpg'[/img]</td> <td width='213' align='left'><a href='javascript:foto('fotos/5.jpg','100','100');'>[img]'fotos/thumbnails/tn5.jpg'[/img]</td> </tr> <tr> <td width='194' align='right'><a href='javascript:foto('fotos/6.jpg','100','100');'>[img]'fotos/thumbnails/tn6.jpg'[/img]</td> <td width='102' align='center'><a href='javascript:foto('fotos/7.jpg','100','100');'>[img]'fotos/thumbnails/tn7.jpg'[/img]</td> <td width='102' align='center'><a href='javascript:foto('fotos/8.jpg','100','100');'>[img]'fotos/thumbnails/tn8.jpg'[/img]</td> <td width='102' align='center'><a href='javascript:foto('fotos/9.jpg','100','100');'>[img]'fotos/thumbnails/tn9.jpg'[/img]</td> <td width='213' align='left'><a href='javascript:foto('fotos/10.jpg','100','100');'>[img]'fotos/thumbnails/tn10.jpg'[/img]</td> </tr> <tr> <td width='194' align='right'><a href='javascript:foto('fotos/11.jpg','100','100');'>[img]'fotos/thumbnails/tn11.jpg'[/img]</td> <td width='102' align='center'><a href='javascript:foto('fotos/12.jpg','100','100');'>[img]'fotos/thumbnails/tn12.jpg'[/img]</td> <td width='102' align='center'><a href='javascript:foto('fotos/13.jpg','100','100');'>[img]'fotos/thumbnails/tn13.jpg'[/img]</td> <td width='102' align='center'><a href='javascript:foto('fotos/14.jpg','100','100');'>[img]'fotos/thumbnails/tn14.jpg'[/img]</td> <td width='213' align='left'><a href='javascript:foto('fotos/15.jpg','100','100');'>[img]'fotos/thumbnails/tn15.jpg'[/img]</td> </tr> <tr> <td width='194' align='right'><a href='javascript:foto('fotos/16.jpg','100','100');'>[img]'fotos/thumbnails/tn16.jpg'[/img]</td> <td width='102' align='center'><a href='javascript:foto('fotos/17.jpg','100','100');'>[img]'fotos/thumbnails/tn17.jpg'[/img]</td> <td width='102' align='center'><a href='javascript:foto('fotos/18.jpg','100','100');'>[img]'fotos/thumbnails/tn18.jpg'[/img]</td> <td width='102' align='center'><a href='javascript:foto('fotos/19.jpg','100','100');'>[img]'fotos/thumbnails/tn19.jpg'[/img]</td> <td width='213' align='left'><a href='javascript:foto('fotos/20.jpg','100','100');'>[img]'fotos/thumbnails/tn20.jpg'[/img]</td> </tr> <tr> <td width='194' align='right'><a href='javascript:foto('fotos/21.jpg','100','100');'>[img]'fotos/thumbnails/tn21.jpg'[/img]</td> <td width='102' align='center'><a href='javascript:foto('fotos/22.jpg','100','100');'>[img]'fotos/thumbnails/tn22.jpg'[/img]</td> <td width='102' align='center'><a href='javascript:foto('fotos/23.jpg','100','100');'>[img]'fotos/thumbnails/tn23.jpg'[/img]</td> <td width='102' align='center'><a href='javascript:foto('fotos/24.jpg','100','100');'>[img]'fotos/thumbnails/tn24.jpg'[/img]</td> <td width='213' align='left'><a href='javascript:foto('fotos/25.jpg','100','100');'>[img]'fotos/thumbnails/tn25.jpg'[/img]</td> </tr> <tr> <td width='194' align='right'><a href='javascript:foto('fotos/26.jpg','100','100');'>[img]'fotos/thumbnails/tn26.jpg'[/img]</td> <td width='102' align='center'><a href='javascript:foto('fotos/27.jpg','100','100');'>[img]'fotos/thumbnails/tn27.jpg'[/img]</td> <td width='102' align='center'><a href='javascript:foto('fotos/28.jpg','100','100');'>[img]'fotos/thumbnails/tn28.jpg'[/img]</td> <td width='102' align='center'><a href='javascript:foto('fotos/29.jpg','100','100');'>[img]'fotos/thumbnails/tn29.jpg'[/img]</td> <td width='213' align='left'><a href='javascript:foto('fotos/30.jpg','100','100');'>[img]'fotos/thumbnails/tn30.jpg'[/img]</td> </tr> <tr> <td width='194' align='right'><a href='javascript:foto('fotos/31.jpg','100','100');'>[img]'fotos/thumbnails/tn31.jpg'[/img]</td> <td width='102' align='center'><a href='javascript:foto('fotos/32.jpg','100','100');'>[img]'fotos/thumbnails/tn32.jpg'[/img]</td> <td width='102' align='center'><a href='javascript:foto('fotos/33.jpg','100','100');'>[img]'fotos/thumbnails/tn33.jpg'[/img]</td> <td width='102' align='center'><a href='javascript:foto('fotos/34.jpg','100','100');'>[img]'fotos/thumbnails/tn34.jpg'[/img]</td> <td width='213' align='left'><a href='javascript:foto('fotos/35.jpg','100','100');'>[img]'fotos/thumbnails/tn35.jpg'[/img]</td> </tr> <tr> <td width='194' align='right'><a href='javascript:foto('fotos/36.jpg','100','100');'>[img]'fotos/thumbnails/tn36.jpg'[/img]</td> <td width='102' align='center'><a href='javascript:foto('fotos/37.jpg','100','100');'>[img]'fotos/thumbnails/tn37.jpg'[/img]</td> <td width='102' align='center'><a href='javascript:foto('fotos/38.jpg','100','100');'>[img]'fotos/thumbnails/tn38.jpg'[/img]</td> <td width='102' align='center'><a href='javascript:foto('fotos/39.jpg','100','100');'>[img]'fotos/thumbnails/tn39.jpg'[/img]</td> <td width='213' align='left'><a href='javascript:foto('fotos/40.jpg','100','100');'>[img]'fotos/thumbnails/tn40.jpg'[/img]</td> </tr> <tr> <td width='194' align='right'><a href='javascript:foto('fotos/41.jpg','100','100');'>[img]'fotos/thumbnails/tn41.jpg'[/img]</td> <td width='102' align='center'><a href='javascript:foto('fotos/42.jpg','100','100');'>[img]'fotos/thumbnails/tn42.jpg'[/img]</td> <td width='102' align='center'><a href='javascript:foto('fotos/43.jpg','100','100');'>[img]'fotos/thumbnails/tn43.jpg'[/img]</td> <td width='102' align='center'><a href='javascript:foto('fotos/44.jpg','100','100');'>[img]'fotos/thumbnails/tn44.jpg'[/img]</td> <td width='213' align='left'><a href='javascript:foto('fotos/45.jpg','100','100');'>[img]'fotos/thumbnails/tn45.jpg'[/img]</td> </tr> <tr> <td width='194' align='right'><a href='javascript:foto('fotos/46.jpg','100','100');'>[img]'fotos/thumbnails/tn46.jpg'[/img]</td> <td width='102' align='center'><a href='javascript:foto('fotos/47.jpg','100','100');'>[img]'fotos/thumbnails/tn47.jpg'[/img]</td> <td width='102' align='center'><a href='javascript:foto('fotos/48.jpg','100','100');'>[img]'fotos/thumbnails/tn48.jpg'[/img]</td> <td width='102' align='center'><a href='javascript:foto('fotos/49.jpg','100','100');'>[img]'fotos/thumbnails/tn49.jpg'[/img]</td> <td width='213' align='left'><a href='javascript:foto('fotos/50.jpg','100','100');'>[img]'fotos/thumbnails/tn50.jpg'[/img]</td> </tr> </table>";include ('foto12.htm');?> |
foto12.htm en foto11.htm bevatten html (voor de layout en wat javascript (de foto function die in het script hierboven gebruikt word)
zoals je ziet doet hij include ('1.php')
in 1.php staan de variables, hier is 1.php:
PHP:
1
| <?$p1 = "1.jpg";$p2 = "2.jpg";$p3 = "3.jpg";$p4 = "4.jpg";$p5 = "5.jpg";$p6 = "6.jpg";$p7 = "7.jpg";$p8 = "8.jpg";$p9 = "9.jpg";$p10 = "10.jpg";$p11 = "11.jpg";$p12 = "12.jpg";$p13 = "13.jpg";$p14 = "14.jpg";$p15 = "15.jpg";$p16 = "16.jpg";$p17 = "17.jpg";$p18 = "18.jpg";$p19 = "19.jpg";$p20 = "20.jpg";$p21 = "21.jpg";$p22 = "22.jpg";$p23 = "23.jpg";$p24 = "24.jpg";$p25 = "25.jpg";$p26 = "26.jpg";$p27 = "27.jpg";$p28 = "28.jpg";$p29 = "29.jpg";$p30 = "30.jpg";$p31 = "31.jpg";$p32 = "32.jpg";$p33 = "33.jpg";$p34 = "34.jpg";$p35 = "35.jpg";$p36 = "36.jpg";$p37 = "37.jpg";$p38 = "38.jpg";$p39 = "39.jpg";$p40 = "40.jpg";$p41 = "41.jpg";$p42 = "42.jpg";$p43 = "43.jpg";$p44 = "44.jpg";$p45 = "45.jpg";$p46 = "46.jpg";$p47 = "47.jpg";$p48 = "48.jpg";$p49 = "49.jpg";$p50 = "50.jpg";$t1 = "tn1.jpg";$t2 = "tn2.jpg";$t3 = "tn3.jpg";$t4 = "tn4.jpg";$t5 = "tn5.jpg";$t6 = "tn6.jpg";$t7 = "tn7.jpg";$t8 = "tn8.jpg";$t9 = "tn9.jpg";$t10 = "tn10.jpg";$t11 = "tn11.jpg";$t12 = "tn12.jpg";$t13 = "tn13.jpg";$t14 = "tn14.jpg";$t15 = "tn15.jpg";$t16 = "tn16.jpg";$t17 = "tn17.jpg";$t18 = "tn18.jpg";$t19 = "tn19.jpg";$t20 = "tn20.jpg";$t21 = "tn21.jpg";$t22 = "tn22.jpg";$t23 = "tn23.jpg";$t24 = "tn24.jpg";$t25 = "tn25.jpg";$t26 = "tn26.jpg";$t27 = "tn27.jpg";$t28 = "tn28.jpg";$t29 = "tn29.jpg";$t30 = "tn30.jpg";$t31 = "tn31.jpg";$t32 = "tn32.jpg";$t33 = "tn33.jpg";$t34 = "tn34.jpg";$t35 = "tn35.jpg";$t36 = "tn36.jpg";$t37 = "tn37.jpg";$t38 = "tn38.jpg";$t39 = "tn39.jpg";$t40 = "tn40.jpg";$t41 = "tn41.jpg";$t42 = "tn42.jpg";$t43 = "tn43.jpg";$t44 = "tn44.jpg";$t45 = "tn45.jpg";$t46 = "tn46.jpg";$t47 = "tn47.jpg";$t48 = "tn48.jpg";$t49 = "tn49.jpg";$t50 = "tn50.jpg";?> |
in 1.php (hierboven) staan de "p-variables" voor de pics en de "t-variables" voor de thumbnails...zo heb ik dus ook 2.php daarin loopt het van 51 t/m 100, 3.php loopt dan van 101 t/m 150 etc. (i think you get the point)...
dus nu staat er nog in testtest.php (zie bovenaan) als img src steeds fotos/1.jpg maar dat moet dus fotos/$t1.jpg enzo worden (alleen werkt dat zo niet), hoe moet dat dan?...
verder wil ik dan nog dat i.p.v. include ('1.php'), dat als je naar testtest.php?id=1 gaat, dattie dan 1.php include, als je naar testtest.php?id=2 gaat, dattie dan 2.php include...etc. kan iemand mij hier mee helpen dan?
p.s. ik vind dat ik het nou wel verdiend heb, want ik heb zelf er veel moeite voor gedaan en dingen gezocht en geleerd