I'm builing a news sytem based at MySQL and PHP. I want to have also comments for the user. So what I want is when a user clicks to read the story (i.e. index.php?id=1) he will be redirected to a page which will have the story and some comments posted by users.
Being new to all of these (PHP, MySQL) I presume I have to set a primary key for the stories table (i.e. newsid) and a foreign key at the comments table (i.e. cid -primary-, newsid -foreign-). Anyone know how to do that with phpMyAdmin?
What I want to know, is how can I make it in the script (index.php) so eveytime someone submits a comment (insert into comments table) will be displayed below the news story?
P.S: Sorry for my grammar...