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
Old 03-02-2009, 09:58 PM php question
Knight13's Avatar
Defies a Status

Posts: 10,289
Name: Knight13
Location: Cleveland, Ohio
Trades: 0
Ok this is my 4th month learning php and mysql, my main reason for learning is because i want to build a social network site, nothing fancy just a small site that lets people create a profile, chat, and post to a forum, now my question is.

How do i make it where when someone logs into the website they see a column that lets them edit their profile and how does it show them their profile column and not someone elses column.

I am not asking anyone to tell me how to do it, i am asking how does it work, i have basically built a login script that checks the users name to the database it is a garbage script but i am just using it to learn with, now i need to figure out how to make the login code go away and a user control panel show up in its place when they sign in.
Knight13 is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 03-02-2009, 11:48 PM Re: php question
racer x's Avatar
Ultra Talker

Posts: 457
Name: Randy
Location: Northern Wisconsin
Trades: 0
Looks like I am at the same point as you with learning php! My practice site will also require a user to log in and edit their own page so I am interested to hear the other replies from the pros here.

I am thinking a profile_id assigned along with each user name and password.
When the user logs in, a session is set up and that profile_id will get the location of THEIR info in a separate table(JOIN). Those variables are loaded into an admin type page template for them to edit. Seems logical, but I'd wait to hear what the others say.
In the meanwhile, this is a great tut I found that uses a login to admin a page with comments.
http://www.roughguidetophp.com/creat...mysql-and-php/

And here's another on session management: http://www.tutorialtastic.co.uk/tuto...php_login_page
racer x is offline
Reply With Quote
View Public Profile Visit racer x's homepage!
 
Old 03-03-2009, 10:00 PM Re: php question
mgraphic's Avatar
Truth Seeker

Latest Blog Post:
JAMISONTUNES
Posts: 2,918
Name: Keith Marshall
Location: Connecticut
Trades: 0
You require sessions to a user logged in during thier stay over the course of browsing the site pages. In the session, you will store a user / profile id like racer mentioned. This id would be tied to anything associated to profiles and preferences stored in the database.
__________________

<mgraphic /> - I don't have a solution but I admire the problem.
mgraphic is offline
Reply With Quote
View Public Profile
 
Old 03-04-2009, 01:49 AM Re: php question
Knight13's Avatar
Defies a Status

Posts: 10,289
Name: Knight13
Location: Cleveland, Ohio
Trades: 0
Thanks for the info i will have to look into sessions now.
Knight13 is offline
Reply With Quote
View Public Profile
 
Old 03-04-2009, 07:34 PM Re: php question
Experienced Talker

Posts: 33
Trades: 0
I did the same as you last year with http://www.wozop.com.
You need to use php sessions, you can then remember that a user is logged in as they navigate around your site.
If the user is logged in you can then display them a different home page to allow them to then goto the edit page. You can then get their details from the database.
__________________

Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE

Last edited by mgraphic; 03-04-2009 at 09:03 PM..
rambo3 is offline
Reply With Quote
View Public Profile
 
Old 03-04-2009, 07:52 PM Re: php question
Knight13's Avatar
Defies a Status

Posts: 10,289
Name: Knight13
Location: Cleveland, Ohio
Trades: 0
Thanks rambo3 for your input, i have been studying on sessions and cookies but for some reason it is not sinking into my head how to do it, so i guess i have to read a few more websites about sessions and cookies to understand them better.
Knight13 is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to php question
 

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.35887 seconds with 12 queries