I have a page which has to display a picture, which has been clicked on from a previous page.
The previous page displays all the images in a directory, and displays them. When the user clicks an image, it takes them to a new page.
Would it be better to have the image in a form, and get the image name with $_POST in the next page, eg:
foreach ($files as $file)
{
?>
<form method="get" action="create.php">
<img src="maps\<? echo"$file";?>" alt="<? echo"$file";?>" height="80" width="80"><br/>
</label><input name="nameofmap" type="hidden" value="<? echo"$file";?>" />
<input type="submit" name="mapuse" value="Use Map" />
</form>
}
or would it be better to have the image name in the URI?
eg:
foreach ($files as $file)
{
?>
<a href="create.php?map=<? echo"$file"?>" ><img src="maps\<? echo"$file";?>" alt="<? echo"$file";?>" height="80" width="80"><br/></a>
<?
}
Are there any major advantages/disadvantages?
Thanks.