Blog Comments php mysql
$30-5000 USD
Paid on delivery
I have a blog embedded in a website ([url removed, login to view] - attached) which successfully displays posts from the table news (sql dump attached).
Under each post you'll see the word 'comments', which is linked to [url removed, login to view] (attached).
Some coding is required on [url removed, login to view] near the 'comments' hyperlink.
TASK1 -> Count the amount of comments on this post (drawn from the blog_comments table (sql attached). I assume this will involve a WHERE clause where newsid = commentid ???
If count = 1, echo "1 comment" and link to [url removed, login to view]
If count != 1, echo "[COUNT] comments" and link to [url removed, login to view]
When the user clicks on "... comments" and is taken to [url removed, login to view], task 2 begins:
TASK 2 -> Where you see CODE NEEDED HERE, insert the code to echo only the blog post selected on the [url removed, login to view] page.
Below this is a form (already finished) which allows users to input a comment and submit to blog_comments_confirm.php.
However, below this form on the [url removed, login to view] page is code which echos all comments. Currently it echoes all comments on all posts. I assume some sort of WHERE clause is needed near where I have typed in CODE NEEDED HERE to only post comments related to this blog post (where commentid = newsid???
TASK 3 -> The [url removed, login to view] page just needs to be tweaked slightly to input the id of the blog post into the newsid field in the blog_comments table, so that the comment can be linked to the relevant post.
All files and tables attached.
Cheers,
Dave
Project ID: #2718775