
Buildingonotheranswers,here'showtodotheloopandhitthedatabaseonlyonce.$query="INSERTINTOdownloads(downloadkey,file,expires)VALUES";while($row=mysql_fetch_array($resultstwo)){$strKey=createKey();$time=time()+(60*60);$query.="('{$strKey}','{$row['filename']}',{$time}),";echo"<ahref='download.php?key=$strKey'>{$row['caption']}</a>";}$query=substr($query,0,-1);//Remove...

I'mworkingonaPHPapplicationthatneedstoobtaindatafromatopographicalmap(differentelevationsdenotedbydifferentcolors).Ineedtodotwothings:Usingthismap(800x600),findawaytodeterminetheexactpixellocationofaparticularcity.Forexample,SanFranciscoislocatedatprecisely121x585.Usingthelocationfrom(1)above,Ineedtoreadtheexactcoloratthatlocation.Note:Themapproviderdoesnotprovidelocation-baseddata,on...