Jump to content

Help with jocka's comment script please...


greenway

Recommended Posts

Hi eveeryone newb here  ;)

I am using jocka's post comment script and have hit a problem.

This is part of the code I am using:
[code]<?
$page_id = "6"; // for example
include("comments/comments_show.php");
include("comments/comments_form.php");
?>[/code]

Now the problem I have is my pages is are posts with an id like:
/view.php?ItemID=1
/view.php?ItemID=2

I understand that if the pages where static html I could just call each page page_id = "6"  "7" ect.
but because each user post is inserted in to the database I dont know what the page ID will be.

I have got the script working except all comments are being shown for each ItemID=
So if there are 10 comments in total in the database on 10 different topics each page is showing all 10.
Link to comment
https://forums.phpfreaks.com/topic/26440-help-with-jockas-comment-script-please/
Share on other sites

Thanks for the tip,I found this on the mysql website after reading your comment.

[color=red]Parameters

link_identifier

    The MySQL connection. If the link identifier is not specified, the last link opened by mysql_connect() is assumed.[/color]

Is that it ?
I have a website that members post stories on.

I have put up a comment script for replies.

Part of the code for the replies is: [code]<?
$page_id = "6"; // for example
include("comments/comments_show.php");
include("comments/comments_form.php");
?>[/code]

From my limited knowledge the help file with the script says to change the page_id to the page number of the post the person is replying to.

Problem is the original posts are being stored in a database with page titles like: mystoryItemID=1
What I want to be able to do is store each comment with the same page ID so comments are only shown in reply for that story.

This is the script I am using:[url=http://www.digitalmidget.com/php_noob/comment.php]http://www.digitalmidget.com/php_noob/comment.php[/url]

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.