I'm stuck in trying to send my streamitem_id over to my likes page with the Lightface popup. I can do this with a normal link as I had my likes page showing who had liked a post. But I fail to do the same when trying to send the id over with the javascript.
Here is what I have and have tried to do.
<script>
window.addEvent('domready',function(){
document.id('start').addEvent('click',function() {
var number1=".$streamitem_data['streamitem_id'].";
light = new LightFace.IFrame({ height:400, width:800, url:'http://www.rawfeeds.co.uk/include/likes.php?streamitem_id='+number1+'', title: 'Likes' }).addButton('Close', function() { light.close(); },true).open();
});
});
</script>
I had an error in my select so printed the the streamitem_id out and it doesn't show. So I'm pretty sure its giving me this because no id is being sent over.
Array ( [streamitem_id] => .$streamitem_data['streamitem_id']. ) SELECT Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '['streamitem_id']. AND feedback_rating=1' at line 1
SQL
<?
if (isset($_GET['streamitem_id'])){
print_r($_GET);
$likes = mysql_query('SELECT feedback_streamid,feedback_userid,feedback_rating FROM streamdata_feedback WHERE feedback_streamid='.$_GET['streamitem_id'].' AND feedback_rating=1') or die("SELECT Error: ".mysql_error());
$numRowslikes= mysql_num_rows($likes);
while($row = mysql_fetch_array($likes)){
echo" $likes";