Shahiro
August 19th, 2006, 03:09 PM
Just recently I taught myself PHP and mySQL, and my first project was making my front page of my site much like a blog, where I can make posts without editing html and uploading, editing them, and deleting them. That works great, I used a table in mySQL to store my posts, name, email, subject and all. Problem is, I'm having a problem figuring out how I'd add it so people can post comments for each seperate topic/post.
Would I create a seperate table for each post for comments?
Another question... I have the post fed from a textarea. The problem is, it doesn't register line breaks, so if I type out a post and start a new paragraph, it still all appears on the same line. How would I make it so it automatically inserts line breaks when I make the post? And if possible, remove the breaks and format it correctly in the textarea when I edit it.
Would I create a seperate table for each post for comments?
Another question... I have the post fed from a textarea. The problem is, it doesn't register line breaks, so if I type out a post and start a new paragraph, it still all appears on the same line. How would I make it so it automatically inserts line breaks when I make the post? And if possible, remove the breaks and format it correctly in the textarea when I edit it.