Need some help in page generation

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
Morbius
Forum Newbie
Posts: 15
Joined: Sat Jul 27, 2002 12:10 am

Need some help in page generation

Post by Morbius »

I was wondering if someone can explain to me how to make a new page generate based on user info. For example: Say I have a website where... okay. Let's say its a game, and the user is trying to make an alliance in the game. Lets say they are allowed a guild banner, guild story etc etc (the guild is the alliance) - should (do you figure) I have it all work off of one page... or how would that work for that guilds information to be displayed?

Reading that, that doesn't make any sense. So I'll add to it and change the senerio.

Say I have an art site... a user uploads his or hers art, how do I allow that art to be shown on a page?
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

Somewhere you store the login information (maybe sessions?). Based upon that your script may decide wether a player is allowed to form/join/leave/edit/delete a guild.
Make some kind of template for the guild pages, e.g.
  • guilds have a
  • name
  • an image
  • a story
  • a memberlist
and store the data for each guild (e.g. in db)
  • id: 1
  • name: GuildA
  • image: imgs/guildA.png
  • story: just a test guild
  • guildId: 1, playerId: 45
  • guildId: 1, playerId: 49
  • guildId: 1, playerId: 50
  • guildId: 2, playerId: 10 (not a member of GuildA, must not appear in its member-list)
Now all you have to do is to assemble the data.

You will probably need some kind of permission-check ... only a founder can edit/delete a guild, players can only be member or founder of one guild, etc.
All best done with a database
Morbius
Forum Newbie
Posts: 15
Joined: Sat Jul 27, 2002 12:10 am

Post by Morbius »

Yes, it is running with a database (PHP MyAdmin) - what my question is, is say there guild gets accepted etc, then how do I allow a said user to view the information of that guild--like the story--so he/she can decide if they wish to join it?

I need suggestions... I'm thinking page generation, but then I don't know how to do that.
Post Reply