Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Looking for a good tutorial on Members Areas
Old 08-14-2009, 01:23 AM Looking for a good tutorial on Members Areas
pappasaa's Avatar
Ultra Talker

Posts: 268
Trades: 0
I need a good tutorial on building a members area.

I have a members area where people can register and login and I have a script that i want to wrap into the members area.

I am not going to give to many details about the script because its a great idea but here is the basics. I need for each user to be able to add...we will call them messages to their member page.

each message is stored into the DB with its own ID <-- i have this script already

I am looking for a tutorial that will show how to link the USED_ID to the MESSAGE_ID in php

still learning the basics of php and sql...the members area script I have in one i got from hotscripts that i am trying to murge with...

any tips?
__________________
visit my link...um...nevermind
pappasaa is offline
Reply With Quote
View Public Profile Visit pappasaa's homepage!
 
 
Register now for full access!
Old 08-14-2009, 06:26 AM Re: Looking for a good tutorial on Members Areas
lizciz's Avatar
Webmaster Talker

Posts: 744
Name: Mattias Nordahl
Location: Sweden
Trades: 0
Add a new table (for example USER_MESSAGES) to your database which have only two ID fileds (USER_ID and MESSAGE_ID). Every time there's a new message you add the current user's ID and the newly created message ID to this table, thereby connecting them to each other.

You'll then be able to find all messages for a specifik user by joining tables (see the different JOIN commands in the manual if you're not familiar with it) or trace a message to the user who owns.

A simpler version (depending on who you ask I guess) would be to add a new field in the message table for the USER_ID. That means everytime a new message is created you tell it to belong to a specifik user.

I can't really tell which one of these options would be the better, regarding speed and efficiency, but I personally like the first one better.
__________________
34343639363436653237373432303635373837303635363337 34323037343638363137343263323036343639363432303739 366637353366
lizciz is offline
Reply With Quote
View Public Profile Visit lizciz's homepage!
 
Old 08-18-2009, 07:52 PM Re: Looking for a good tutorial on Members Areas
pappasaa's Avatar
Ultra Talker

Posts: 268
Trades: 0
this is a great help as far as locating the information by users...I have founf many tutorials on the subject. Thank you

I am not looking for a tutorial in how to insert the information..

My goal
to have a member login
on their private login page have a form to sumit messages a journal entry
be able to add as many entries they want
add/edit/delete

this members area would be specific to each user

I have the add/edit/ and delete script and the members area script...i also have my tables setup...But i need to join the two so I can see these results...

Is joining tables the way I need to go or is there a more specific direction...
__________________
visit my link...um...nevermind
pappasaa is offline
Reply With Quote
View Public Profile Visit pappasaa's homepage!
 
Old 08-19-2009, 06:51 AM Re: Looking for a good tutorial on Members Areas
lizciz's Avatar
Webmaster Talker

Posts: 744
Name: Mattias Nordahl
Location: Sweden
Trades: 0
I'm not really following you now.
When I said joining tables I meant with the SQL JOIN command, which you use to select data from several tables at once. In it's simplest form you dont evan have to write the JOIN command, it is used automatically.

An example
PHP Code:
SELECT messagemessage_id FROM message_tableuser_table WHERE message_table.user_id user_table.user_id AND user_table.user_id 12345 
That would join the tables message_table and user_table, in order to select all the messages that belong to the user with ID 12345. In your script 12345 would of course be raplaced with a variable.
__________________
34343639363436653237373432303635373837303635363337 34323037343638363137343263323036343639363432303739 366637353366
lizciz is offline
Reply With Quote
View Public Profile Visit lizciz's homepage!
 
Reply     « Reply to Looking for a good tutorial on Members Areas
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.14572 seconds with 12 queries