I have two tables as below:
Table-1-contacts
-id (primary key, AUTO_INCREMENT)
-firstname(varchar)
-lastname (varchar)
-email (varchar)
Table-2-comments
-id (primary key, AUTO_INCREMENT)
-fullname (varchar)
-email (varchar)
-comment(text)
-date(varchar)
I want to write php and MySQL query to get and write comments which will be connected to the contact.I want to to get output as below:
url-contact.php?id=1
name-contact1
comment-contact1 is great.
url-contact.php?id=2
name-contact2
comment-contact2 is okay.
How can i do this? First I need to write comments which will be connected to each contact when entering from that contacts page. Second I need to get all the comments of that contact when that contact is accessed.
I appreciate the help from you now. Thanks in advance.