Version: 2008
  • On The Insider: Miley Cyrus in Sex and the City 2
Advanced Search
advertisement
advertisement

Forum display:

Coding & scripting: new to php... i'm sure this is easy... please help...

by puzzle78 - 5/8/06 4:25 PM
advertisement
Post 1 of 3

new to php... i'm sure this is easy... please help...

by puzzle78 - 5/8/06 4:25 PM

hey,

so i have this site i'm working on. using php. it's kind of like a 'blog'. updates go into the database, the main page will automatically display the 5 newest entries. my question is this. how can i set up an 'archives' type page, where people can access all of the older updates?

i want the title of all of the updates to be displayed, the user clicks one, that update is shown in my template.

i know this can be done, and i know it can't be that hard... can anyone give me a hand?

thank you in advance.

Post 2 of 3

last news and arshive

by El_Mikee - 5/9/06 6:54 PM In reply to: new to php... i'm sure this is easy... please help... by puzzle78

$last_news = mysql_query(''select * from table order by id desc limit 5'');

//your code here


$arshive = mysql_query(''select * from table order by id desc limit 5,9999'');

// your code for arshive

Post 3 of 3

thanks, but...

by puzzle78 - 5/10/06 8:51 AM In reply to: last news and arshive by El_Mikee

thanks for the response.

i actually have that part working...

what i want to do is set it up so that people can click on the links and the body of the title they pick will be shown on my template.

i guess what i need to know is how to pass variables (the id of the 'entry') from one page to another. then i can simply do a select * from updates where id=($passedVariableForStoryIWant)

Forum legend:
Locked Locked thread
Moderator Moderator
CNET staff CNET staff
Samsung staff Samsung staff
Norton Authorized Support team Norton Authorized Support team
AVG staff AVG staff
Windows Outreach team Windows Outreach team
Dell staff Dell staff
Intel staff Intel staff
Powered by Jive Software