. , . .te iframe
$SQL = "SELECT * FROM PHOTO_GALLERY";
$result = mysql_query( $SQL );
while( $row = mysql_fetch_array( $result ) ) {
$photo_id = $row["photo_id"];
$photo = $row["photo"];
$photo_name = $row["photo_name"];
$picture = "<img alt='$photo_name' title='$photo_name' src='http://$domain/$photo'>";
echo '<span style="cursor:pointer" class="picture_'.$photo_id.'"><img title="Click to add image" alt="'.$photo_name.'" height="50" src="/'.$photo.'" width="50"/></span>
< script>
$(document).ready(function(){
$(".picture_'.$photo_id.'").click(function() {
$(".te").contents().find("body").append("'.$picture.'");
});
});
< /script>