Jump to content

HTML help on storing links in MySQL DB


bre
 Share

Recommended Posts

Kind of new to this forum so if wrong place to post this, sorry. I'm writing, actually modifying a free blog I got and want to be able to have clickable links in the blog posts and comments. How should I store them in the DB? Should I store them as <a href="... and just display them or what? Right now it is storing them like that but is displaying them as <a href="... instead of making them into a link. If someone could point me to a tutorial on this, It would be great. Thanks.

Edited by bre
Link to comment
Share on other sites

the most common method is to use the database to store posts and comments in tables, with unique id's for each record, and a foreign key for comments to posts. You can use the database to retrieve the post ID's and then usually those ID's are passed into a template page for showing posts, and the page uses the passed in ID to get the right info from the DB.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...