Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.
I think the error is below, it seems to not be taking working at the bit id=".$_GET['id']. as it isnt finding it perhaps jue to the uniqe way it works, but if the id is typed in manually in the browser when you open the frame out on its own http://www.test.jennifersplaygroup.co.uk/includes/story_comments.php?id=%s this is the raw result but if you manually type in the story id you get http://www.test.jennifersplaygroup.co.uk/includes/story_comments.php?id=55

Code:
<?php
print "<IFRAME SRC=\"includes/story_comments.php?id=".$_GET['id']."\" width=\"100%\" height=\"325\" frameborder=\"0\" name=\"topiframe\"></IFRAME><br />";
?>
<br />
<a href="javascript:ajaxpage('includes/newcomment.php', 'addnew');">Add new comment</a>
<div id="addnew">
</div>

I am having a difficult time following what error you are still getting, and what the relevant bits of code are. But if you are still having the issue where the id is not passed to the new comment script, this may help...

If I am following correctly, you are using the following anchor tag to add a new comment:
Code:
<a href="javascript:ajaxpage('includes/newcomment.php', 'addnew');">Add new comment</a>

And the file newcomment.php contains the following code loaded in an iframe:
Code:
<?php
print "<IFRAME SRC=\"includes/storys_comment.php?id=".$_GET['id']."\" width=\"100%\" height=\"275\" frameborder=\"0\" name=\"bottomiframe\"></IFRAME>";
?>
So the newcomment.php is trying to retrieve the $_GET['id'] global from the parent script. Try changing the anchor tag which calls the newcomment.php iframe to the following:
Code:
<a href="javascript:ajaxpage('includes/newcomment.php?id=<?php print $id; ?>', 'addnew');">Add new comment</a>

Note, this will only work if the file which calls the anchor tag has $id set. You may have to use this instead.
Code:
<a href="javascript:ajaxpage('includes/newcomment.php?id=<?php print $_GET['id']; ?>', 'addnew');">Add new comment</a>

I hope this helps.
 
wow thanks it works perfict now i can finally get on with the rest of the site development and design now.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.