like button in repeated region
Hi, I have a dynamic page with a repeated region. I would like to put the like button into the loop: index.php?hkat=5&ukat=15
I put this code into the loop:
<?php do { ?>
<a name="story" id="story<?php echo $row_rsMiddleContent['storyID']; ?>"></a>
<?php echo $row_rsMiddleContent['inhalt']; ?>
<div class="wasocial_facebook_like">
<div id="fb-root"></div>
<script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script>
<fb:like href="<?php echo urlencode(((!empty($_SERVER["HTTPS"])) ? "https://" : "http://") . $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"]); ?>?hkat=<?php echo $_GET['hkat']; ?>&ukat=<?php echo $_GET['ukat']?>&story=story<?php echo $row_rsMiddleContent['storyID']; ?>" send="false" layout="standard" width="450" show_faces="true" action="like" colorscheme="light" font="arial"></fb:like>
</div>
<?php } while ($row_rsMiddleContent = mysql_fetch_assoc($rsMiddleContent)); ?>
but the button only appears at the very end of the page. Any help would be multo appreciated...