Web Design Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsWeb DesignWeb Design Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old January 21st, 2012, 02:39 PM
moorlagt moorlagt is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2012
Posts: 4 moorlagt User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 44 m 16 sec
Reputation Power: 0
Help understanding a solid way of adding and viewing member profiles.

First of all thanks for checking out my thread! I'm new to web development(about 6 months) but I have a pretty solid grasp on Php,Html, MySQL,Css and I'm just starting on java script. I'm part of a Web app team at my tech center and we were given the task of creating a site to get kids active. We won at a regional level and where going to state in march.

I want to allow the kids to add there friends and see what challenges they've completed and so on. But I'm having a tough time putting it all together. For instance should I have a MySQL DB full of who is friends with who? And should it viewing profile pages be JavaScript or php or maybe theres a better script?

If this is the wrong section I apologize. I'm not looking for any code just trying to piece it together in my head.


Thank you!;
Travier

Reply With Quote
  #2  
Old January 22nd, 2012, 04:39 PM
Catacaustic's Avatar
Catacaustic Catacaustic is offline
Code Monkey V. 0.9
Dev Shed Intermediate (1500 - 1999 posts)
 
Join Date: Mar 2005
Location: A Land Down Under
Posts: 1,884 Catacaustic User rank is General 12nd Grade (Above 100000 Reputation Level)Catacaustic User rank is General 12nd Grade (Above 100000 Reputation Level)Catacaustic User rank is General 12nd Grade (Above 100000 Reputation Level)Catacaustic User rank is General 12nd Grade (Above 100000 Reputation Level)Catacaustic User rank is General 12nd Grade (Above 100000 Reputation Level)Catacaustic User rank is General 12nd Grade (Above 100000 Reputation Level)Catacaustic User rank is General 12nd Grade (Above 100000 Reputation Level)Catacaustic User rank is General 12nd Grade (Above 100000 Reputation Level)Catacaustic User rank is General 12nd Grade (Above 100000 Reputation Level)Catacaustic User rank is General 12nd Grade (Above 100000 Reputation Level)Catacaustic User rank is General 12nd Grade (Above 100000 Reputation Level)Catacaustic User rank is General 12nd Grade (Above 100000 Reputation Level)Catacaustic User rank is General 12nd Grade (Above 100000 Reputation Level)Catacaustic User rank is General 12nd Grade (Above 100000 Reputation Level)Catacaustic User rank is General 12nd Grade (Above 100000 Reputation Level)Catacaustic User rank is General 12nd Grade (Above 100000 Reputation Level) 
Time spent in forums: 2 Weeks 4 Days 14 h 1 m 42 sec
Reputation Power: 1798
You'll need to track who is freinds with who somehow. The best way for this is a database. It can be done other ways like text files or XML but these are not good ideas because they are really only useful for small-scale applications.

The viewing pages would be made with PHP to output the HTML. JavaScript is not able to do anything server-side (well, not easily so far) so these two languages are really used for different things.

One big pint to remember is the privacy aspect of it all - especially when dealing with kids. Even something as innocent as sharing results like that can go bad if kids get together to gang up on others.

Reply With Quote
  #3  
Old January 22nd, 2012, 05:21 PM
moorlagt moorlagt is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2012
Posts: 4 moorlagt User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 44 m 16 sec
Reputation Power: 0
Thanks for the reply!

But I defiantly agree with privacy I was kinda overlooking that. But thats something I really need to look into.

And whats a good way to setup the mysql table? Something like this:
Code:
ID        FriendA       FriendB 
23          Bob            Jim


Where one row shows the relation between 2 members?

Reply With Quote
  #4  
Old January 22nd, 2012, 05:38 PM
Catacaustic's Avatar
Catacaustic Catacaustic is offline
Code Monkey V. 0.9
Dev Shed Intermediate (1500 - 1999 posts)
 
Join Date: Mar 2005
Location: A Land Down Under
Posts: 1,884 Catacaustic User rank is General 12nd Grade (Above 100000 Reputation Level)Catacaustic User rank is General 12nd Grade (Above 100000 Reputation Level)Catacaustic User rank is General 12nd Grade (Above 100000 Reputation Level)Catacaustic User rank is General 12nd Grade (Above 100000 Reputation Level)Catacaustic User rank is General 12nd Grade (Above 100000 Reputation Level)Catacaustic User rank is General 12nd Grade (Above 100000 Reputation Level)Catacaustic User rank is General 12nd Grade (Above 100000 Reputation Level)Catacaustic User rank is General 12nd Grade (Above 100000 Reputation Level)Catacaustic User rank is General 12nd Grade (Above 100000 Reputation Level)Catacaustic User rank is General 12nd Grade (Above 100000 Reputation Level)Catacaustic User rank is General 12nd Grade (Above 100000 Reputation Level)Catacaustic User rank is General 12nd Grade (Above 100000 Reputation Level)Catacaustic User rank is General 12nd Grade (Above 100000 Reputation Level)Catacaustic User rank is General 12nd Grade (Above 100000 Reputation Level)Catacaustic User rank is General 12nd Grade (Above 100000 Reputation Level)Catacaustic User rank is General 12nd Grade (Above 100000 Reputation Level) 
Time spent in forums: 2 Weeks 4 Days 14 h 1 m 42 sec
Reputation Power: 1798
For a friends table, you don't need quite that much info, but it's close. You really only need two columns, with each one being the ID of the members that are set as friends.
Code:
user_1  user_2
45     53

If you want to do it "properly" also look into making a primary key using both columns so that you don't get duplicate entries. You should also check for entries that are around the other way, so you don't get something like:
Code:
user_1 user_2
45     53
53     45

Reply With Quote
  #5  
Old January 22nd, 2012, 05:55 PM
moorlagt moorlagt is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2012
Posts: 4 moorlagt User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 44 m 16 sec
Reputation Power: 0
Thanks I really appreciated this! I will defiantly use the users id instead of the username. I haven't looked to much in the proper etiquette of SQL dbs but I will check it out!

Thanks;
-Travier

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignWeb Design Help > Help understanding a solid way of adding and viewing member profiles.

Developer Shed Advertisers and Affiliates



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 | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap