General Programming Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingGeneral Programming Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old January 26th, 2003, 03:50 PM
chuckfx chuckfx is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2003
Posts: 5 chuckfx User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Script help, I cant make this program!

OK, first off, I stink at making any type of PHP, but i REALLY need this script for my site...so please give me a hand. It's for a game site of mine with reviews and codes and media, and I just can't find anything that could help me. Heres how I want it to work:
-I want there to be a page with the letters #-Z (links) and then, about a line down, I want there to be somthing that says "Newly Added" and the 5 newest reviews (all links) to be listed under there (see EX. 1). Then, say somone clicks the letter B, they then should be taken to a page with all the reviews (there titles, all links) starting with B, and if they click one of them, they are taken to the review of that things title. (see EX. 2-3)
-It all can be done with HTML (except displaying the 5 newest articles) I know, but theres a catch...
-I want there to be a login page where staff members can login with a username and Password that I create and then they can be taken to a page where they can add Reviews, Codes or media (see EX. 4) Here they can just fill in custom feilds i make and click post and It would appear under the title of the first letter on the page (see EX. 5)
-I would really apprcuate it if someone could help me, and I will dispaly a link to there site and/or there name if they wish.

EX1
#|A|B|C|D|etc

Newly added:
Thing 1
Thing 2
etc.

EX2
#|A|B|C|D|etc

Thing with B 1
Thing with B 2
etc

EX3
#|A|B|C|D|etc
(Game tiltle)
This game blah blah blah

EX4
Username:
Password:
(link) Login
Then they are taken to somthing like:
Add Reviews
Add Media
Add Codes

EX5
(for reviews)
Game Starts with: (drop down box, so when it is posted, it goes under the correct letter)
Game Title: (They fill in info here)
Review: (They fill in info here)
Finall score: (They fill in info here)

Last edited by chuckfx : January 26th, 2003 at 03:58 PM.

Reply With Quote
  #2  
Old January 26th, 2003, 05:35 PM
jpenn jpenn is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Oct 2002
Location: Washington, DC
Posts: 317 jpenn User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 m 3 sec
Reputation Power: 6
chuckfx - please read our forum rules before posting anymore threads. Your thread subject Need help with a script! is unacceptable for this forum.
__________________
~ Joe Penn

We work for free to help make this a valuable resource on the internet. Do you appreciate the help - did we provide help that will help you prosper and help that has contributed to sharpening your current skill set?

Show your appreciation and purchase something from our Amazon Wishlist's - it's simple and a great way to say thank you.




Reply With Quote
  #3  
Old January 31st, 2003, 05:57 AM
garethr garethr is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2003
Location: Newcastle upon Tyne, UK
Posts: 7 garethr User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
I'm guessing you want to have a database (prob mysql?) to store the info.

If so its relatively straight forward. Give each article a name (the one you want to begin with a specific letter for searching) and some content and a unique ID number.

So you have three columns in you database (ID, article_name and content)

For each of the links letters pass a variable $letter to a script ie. for a set $letter=a then call a script with something similar to below to list all the articles. the link shoud be to another script that displays the article with its ID set to ID

The list script:

<?php

$query = "SELECT * FROM table_name WHERE article_name LIKE $letter%";
$query_result = mysql_query($query);

while ($row = mysql_fetch_array($query_result)) {
echo "<a href="another_script?ID=$row[ID]">$row[article_name]</a>";
}

?>

The display script:

<?php

$query = "SELECT * FROM table_name WHERE ID=$ID";
$query_result = mysql_query($query);

while ($row = mysql_fetch_array($query_result)) {
echo "<h1>$row[article_name]</h1>";
echo "<p>$row[content]</p>";
}

?>

As for the newest articles bit add a DATETIME field to your database and when you post articles store the NOW() variable in it. The list all the articles as above but use LIMIT 4 (or any number) and ORDER ASC date in the query.

I hope that helps!

If not i might get time to build it. I'm relatively new to PHP too so finding interesting stuff to work on to increase my skills.

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingGeneral Programming Help > Need help with a script!


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway
Stay green...Green IT