snippet library logo
in category
PHP / Misc / Picture Viewer
Snippet details
ID: 514
Viewed: 1610
Added: 2003-10-03
Version: all
Sorry no demo

User Rated at:
Rate This:
Snippets in this catagory         
Show Printable Version
This is a simple picture.php file that lets you pass it the img src, the alt, the page title, and the alternate title for the image. You would call it like this:
picture.php?picture=pic.jpg&alt=AltText&alttitle=PicTitleForIE&title=PageTitle

Make sure that spaces get replaced with %20 and that &'s are replaced with & in all your links.

General Details
Snippet uploaded by: Aaron Campbell
Email : snippetlibrary@ezdispatch.com
Snippet By: Aaron D. Campbell

<!---Head--->
<?php if (!$_GET['picture'])

$picture ""
} else { 
$picture $_GET['picture']; 
}
?>
<?php 
if (!$_GET['alt'])

$alt "picture"
} else { 
$alt stripslashes($_GET["alt"]); 
}
?>
<?php 
if (!$_GET['alttitle'])

$alttitle $alt
} else { 
$alttitle stripslashes($_GET["alttitle"]); 
}
?>
<?php 
if (!$_GET['title'])

$title $alt
} else { 
$title stripslashes($_GET["title"]); 
}
?>
<title><? echo $title ?></title>

<!---Body--->


<div align="center"><a href="javascript:history.back(1)">Back</a><br />
  <img src="images/<? echo $picture ?>" alt="<? echo $alt ?>" title="<? echo $alttitle ?>" /><br />
    <a href="javascript:history.back(1)">Back</a>
</div>




No Reviews to show


Please completely fill out the form below if you want to review this snippet. All reviews are subject to validation.


Subject:

Reviewed By:

Write a review:





Terms of Conditions
Powered By
Avian Hosting
© 2005 snippetlibrary.com All Rights Reserved.