|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
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. |
|
#2
|
|||
|
|||
|
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. |
|
#3
|
|||
|
|||
|
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. |
![]() |
| Viewing: Dev Articles Community Forums > Programming > General Programming Help > Need help with a script! |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|