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

 

 

 

 

Link to comment
Share on other sites

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. 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.