Jump to content

Selecting data from DB - appear in different divs


Spiew

Recommended Posts

Hello,

 

I just came across a problem... This if my first post on this website since I just found out about it. Hopefully I could get some help from here since you seem to be the real deal and uses PDO!

 

I want to echo out the title, category & content from database. I know how to do this, but not how to make them editable for me. Hard to explain but this is an example:

 

(This is how it looks now when I'm echoing out the title,category & content using a while loop.)

 

TitleCategoryContent

 

(I want them to appear like this so I can fix them up to look nice in a container)

 

Title

 

Category

 

Content here

 

 

Here's my code

http://pastebin.com/Lg5YebgZ

 

 

 

Thanks in advanced

 

 

 

 

That won't work because I get all the titles, categories & content from the database. Same thing now when I use the while loop. I want the title to be displayed in a black bar, with the category right below it and then content . All this is one container (as one post). Then I want the latest 5 posts to look like this. 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.