Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Seperate news box help
Old 03-18-2008, 02:55 AM Seperate news box help
Average Talker

Posts: 20
Trades: 0
Hey everyone... I have created a news system for my new site. It works great and all, but it wont work with my template. Here is what my main content box looks like....

Code:
<div id="maincontent">
            <h2><a href="#">hide</a></h2>
            <div class="contentbox">
                <p></p>
            </div>
Well I want to have separate boxes for every new news post I make. So I want it to looks something like this...

Code:
<div id="maincontent">
            <h2><a href="#">hide</a><?php echo($news['title']); ?></h2>
            <div class="contentbox">
                <p><?php echo($news['author']); ?></p>
            </div>
When I do that though, nothing appears... but even when I just make a separate file and include it, it all is displayed in just one box. So my question here is how to make this data appear in separate boxes whenever I make a new news post. Thank you! .
UnfixedCODERJ is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 03-18-2008, 03:19 AM Re: Seperate news box help
mtishetsky's Avatar
King Spam Talker

Posts: 1,226
Name: Mike
Location: Mataro, Spain
Trades: 0
Do you get empty html or empty spaces where the php output should be?
__________________

Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE

And don't forget to give me talkupation!
mtishetsky is offline
Reply With Quote
View Public Profile Visit mtishetsky's homepage!
 
Old 03-18-2008, 03:28 AM Re: Seperate news box help
Average Talker

Posts: 20
Trades: 0
Quote:
Originally Posted by mtishetsky View Post
Do you get empty html or empty spaces where the php output should be?
Just a blank content box. Nothing there at all.
UnfixedCODERJ is offline
Reply With Quote
View Public Profile
 
Old 03-18-2008, 08:34 PM Re: Seperate news box help
Average Talker

Posts: 20
Trades: 0
anyone?
UnfixedCODERJ is offline
Reply With Quote
View Public Profile
 
Old 03-19-2008, 03:40 AM Re: Seperate news box help
mtishetsky's Avatar
King Spam Talker

Posts: 1,226
Name: Mike
Location: Mataro, Spain
Trades: 0
Add
PHP Code:
<pre><? print_r($news)?></pre>
somewhere to ensure that your $news array really contains something.
__________________

Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE

And don't forget to give me talkupation!
mtishetsky is offline
Reply With Quote
View Public Profile Visit mtishetsky's homepage!
 
Old 03-20-2008, 02:20 AM Re: Seperate news box help
Average Talker

Posts: 20
Trades: 0
Na... I figured it out... my div tags were all messed up. Thanks for the reply though .
UnfixedCODERJ is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Seperate news box help
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.23933 seconds with 12 queries