PHP HELP!!

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
James7285
Forum Newbie
Posts: 3
Joined: Sat Jul 12, 2003 9:52 am

PHP HELP!!

Post by James7285 »

Hello, I have never used PHP before so I have no idea what im doing... I do know HTML very well so im assuming that will help..

Right this is what I need...

I have a website for a clan on Gamespy, we play a game called stronghold. What I need to do is make a PHP database for recording games play...

So this is how it would work, after a game the memebers of the clan will go to the home page and login which will take them to the PHP page..

On the PHP page I need them to be able to write into different txt boxs, the name of the person they played, a drop down box with Win or Loss in it. A score out of 10, the date played and a bigger box for comments on the game.

After they have filled it in they would click submit and it would then be entered into a database which will be displayed on the main page of the website. It would show 10 records and then have the usual Next Previus buttons at the bottom to show more records. I want it to go in order of the last game played being displayed first....

Now this is probably really complicated and seeing as i know nothing about PHP might not be do able

Is there anyone that can point me in the right direction? R there any programs u can download that will do this for u so u dhave to do much coding?

If anyone needs a better or more detailed description on what I want just ask!

Thanks for taking the time to read this!
and thanks in advance to anyone that posts some help!

James
m3rajk
DevNet Resident
Posts: 1191
Joined: Mon Jun 02, 2003 3:37 pm

Post by m3rajk »

do you want a text file (can get really big really fast and can be made a csv that can be opened by excel), or a real db (which has functions to export to a csv, which can be opened by excel)?

i ask this because chances are you want more than php. if you don't care about stability you can go get a 'wimp' platform to work on, but if you care for stability, you'll find a 'lamp' to work on

mysql is probalby the easiest to learn, and the user maual is available online.

my suggestion: find a lamp platform. create a db with the fields. create a form with the feilds...if you need help i can give you it there... i have a variable successfully passed the first three times then not passed right now, however all the error checking and warning checks work perfectly and it keeps state


lamp==Linux Apache MySQL PHP
wimp==Windows IIS MySQL PHP
User avatar
patrikG
DevNet Master
Posts: 4235
Joined: Thu Aug 15, 2002 5:53 am
Location: Sussex, UK

Post by patrikG »

If you just want to quickly set up a website have a look at content-management systems (CMS) like

http://www.php.nuke.com (works, but is buggy)
http://smarty.php.net/ (from what I hear very powerful)

or try good old google:

http://www.google.com/search?q=content% ... 8&oe=utf-8

If you really want to learn PHP, MySQL etc.:
it will take you some time to get what you want
it will be more rewarding
you will learn very nice skills

I recommend you buy yourself a book (there are recommendations in this thread.
James7285
Forum Newbie
Posts: 3
Joined: Sat Jul 12, 2003 9:52 am

Post by James7285 »

thanks for your replay!

to be honest I dont know what would be better out of a txt file or a DB.. what do u think..

and as i say im very new to this sort of thing so, "Wimp" and "Lamp" mean nothing to me lol sorry

and to the other reply, thanks i will have a look at those websites, see if i can find anything useful!
m3rajk
DevNet Resident
Posts: 1191
Joined: Mon Jun 02, 2003 3:37 pm

Post by m3rajk »

the tiny text there is the definition of WIMP and LAMP... simply put, wimp platforms are, well, wimpy. LAMP is what most companies look for background with (if they seek mysql).

i say go with the db. if you decde to keep this around it'll grow large. but it'll grow slowerin a real db.
i think it's obvious i'm about to suggest mysql.

if you have a messenger service and would like to talk on that let me know. i'm the type that picks up syntax fast and then has weird issues like php isn't picking up a variable that should be being passed to it (see my thread somewhere else ont he first page)
James7285
Forum Newbie
Posts: 3
Joined: Sat Jul 12, 2003 9:52 am

Post by James7285 »

right i think im starting to get what u mean.. let me show u an example of exactly what i want and u might be able to help more...

go to http://www.fnxclan.cjb.net

they r a clan on the same game with the same thing i want...

on the first page scroll down until u get to the section titled barraks..
there is a table with names listed in it (FNX_Maxivus, FNX_Kardnal etc)

if u click on one of there names it takes u to a page with 2 tables Victorys and defeats

this is exatly what I want (although I dont mind having vicotrys and defeats in the same table)

now u see what I mean? Ok i really need to start with the basics lol
for the very first thing what program is best to use?

thanks
james
m3rajk
DevNet Resident
Posts: 1191
Joined: Mon Jun 02, 2003 3:37 pm

Post by m3rajk »

you need a db. if possible get a LAMP environment. more likely the issue is you when something is wrong. can't say that about a WIMP environment.

as i stated above, WIMP stands to Windows IIS MySQL PHP; LAMP stands for Linux Apache MySQL PHP

what you need first is to determine the way you want your site to look. make a set of dummy pages in html. when you have the layout, etc, then you decide what the db can do. put as much there as possible.

from what i can tell you want the following feilds:

user id
rank
score
wins
losses
games played
last game


mysql's site: http://www.mysql.com/
online user manual: http://www.mysql.com/documentation/mysq ... index.html

i'm hesitant to give you more becasue you wont learn. if you wanna question me on whys of things and talk design, i'm willing, but in real-time, so you'll have to tell me how to talk to you in real-time
qartis
Forum Contributor
Posts: 271
Joined: Sat Dec 14, 2002 4:43 pm
Location: BC, Canada
Contact:

Post by qartis »

Also, you'd get more replies if you were more discriptive regarding your topic's title. "PHP HELP" is the topic of the whole forum, so it really doesn't convince us to click the link :)
Post Reply