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
Old 06-15-2005, 12:31 PM PHP Question
SpottyDog's Avatar
Skilled Talker

Posts: 82
Trades: 0
Hey guys,

Ok. On my new site i was to be able to write news. Each news section will be held in a content box ive made in a sperate file. So for example, the first news article will be held in a file called news1.php. I want my index to be able to grab the two highest numbered files, display them and automatically put a link at the bottem saying 'Recent Articles' and it will go back and grab the next two highest numbers.

I hope this make sence.

SpottyDog
SpottyDog is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 06-15-2005, 01:03 PM
stoot98's Avatar
Ultra Talker

Posts: 427
Name: Stuart
Location: Glasgow, Scotland
Trades: 0
I would use a database for this. It would make things a whole lot easier. I can't help you with the way you want to do this now though im afraid
stoot98 is offline
Reply With Quote
View Public Profile
 
Old 06-15-2005, 01:41 PM
SpottyDog's Avatar
Skilled Talker

Posts: 82
Trades: 0
ok can anybody help with this? i would prefere to do it the file way but i suppose the database way would work jus as effectivly
SpottyDog is offline
Reply With Quote
View Public Profile
 
Old 06-18-2005, 09:48 AM
SpottyDog's Avatar
Skilled Talker

Posts: 82
Trades: 0
anybody? somebody must have an idea of how to do this.
SpottyDog is offline
Reply With Quote
View Public Profile
 
Old 06-18-2005, 09:58 AM
Kyrnt's Avatar
The Post-Mod Years

Posts: 2,536
Location: Western Maryland
Trades: 0
Do you want someone to write the entire solution for you? That could take a significant effort -- which is probably why you have no responses. What have you done so far? Do you have any segment(s) working?
__________________
—Kyrnt
Kyrnt is offline
Reply With Quote
View Public Profile Visit Kyrnt's homepage!
 
Old 06-18-2005, 10:15 AM
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,385
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
maybe the lack of replies should be telling you something.

This quote does show you haven't thought the idea through enough
Quote:
but i suppose the database way would work jus as effectivly
A database for news is far more effective than flat files. Get your naming convention out with files and your sequence goes totally haywire as 10 is before 2 in filename order.
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 06-18-2005, 10:26 AM
feraira's Avatar
BeTheBand!

Posts: 350
Trades: 0
The only solution i can give to this is to do like:

www.website.com/news.php?story=1
www.website.com/news.php?story=2
www.website.com/news.php?story=3
feraira is offline
Reply With Quote
View Public Profile
 
Old 06-18-2005, 10:37 AM
SpottyDog's Avatar
Skilled Talker

Posts: 82
Trades: 0
i have no idea how to do it. i wasnt asking for a complete code jus what was the easiest way around it and what sort of code will i need. I didnt really think it through no but at the time flat file seemed more logical because it has images, ads and all sorts goin into the news. not jus plain text.

Last edited by SpottyDog; 06-18-2005 at 10:39 AM..
SpottyDog is offline
Reply With Quote
View Public Profile
 
Old 06-18-2005, 10:43 AM
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,385
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
even images are plain text in html

HTML Code:
this is some text <img src="image_name" alt="this is still text"> and some text at the other side
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 06-18-2005, 11:50 AM
SpottyDog's Avatar
Skilled Talker

Posts: 82
Trades: 0
yes granted, im not a complete moron tho!

Well tthanks anyway guys. will look elsewhere
SpottyDog is offline
Reply With Quote
View Public Profile
 
Old 06-18-2005, 02:00 PM
feraira's Avatar
BeTheBand!

Posts: 350
Trades: 0
if your wanting the code for the thing i just said check out www.xing-designs.com/scripts/news <-- if you like it, ask me and i'll give u it.. just an idea!
feraira is offline
Reply With Quote
View Public Profile
 
Old 06-18-2005, 02:10 PM
SpottyDog's Avatar
Skilled Talker

Posts: 82
Trades: 0
yes! feraira i like it. i can then simply jus connect to the two highest articlesand display them on my index and have a link at the bottom linking to the news page showing a list like that.

Please can i have it?

Thanks dude

Last edited by SpottyDog; 06-18-2005 at 07:21 PM..
SpottyDog is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to PHP Question
 

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 1.92263 seconds with 12 queries