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
session based members area help
Old 07-01-2006, 08:59 AM session based members area help
pappasaa's Avatar
Ultra Talker

Posts: 268
Trades: 0
I am looking for a good but simple tutorial for my session based members area. This is going to be like a myspace.com thing mixed with a geocities.com thing but not so myspace-geocities.com 'ish. I already have the register/login script working and a few other cool features. I am just looking for some tips and ideas that I might not be thinking about.

I guess anything php & sql session based stuff with a security thing sticking out the side would be helpfull. I have found a few articles but have not been inspired to do much just yet. I know how to do what I want to do but I am looking for a muze...

I will be looking for help on my project after I have fun with it for a few months
pappasaa is offline
Reply With Quote
View Public Profile Visit pappasaa's homepage!
 
 
Register now for full access!
Old 07-01-2006, 10:46 PM Re: session based members area help
mgraphic's Avatar
Truth Seeker

Latest Blog Post:
JAMISONTUNES
Posts: 2,918
Name: Keith Marshall
Location: Connecticut
Trades: 0
This is a pretty good tutorial:
http://www.zend.com/zend/tut/session.php

However, it was written for PHP 4 and uses examples of depreciated methods such as session_register() and session_unregister()
__________________

<mgraphic /> - I don't have a solution but I admire the problem.
mgraphic is offline
Reply With Quote
View Public Profile
 
Old 07-03-2006, 06:43 AM Re: session based members area help
ibbo's Avatar
Super Spam Talker

Posts: 880
Location: Leeds UK
Trades: 0
I simply map user data into the session on a successfull login.

$row = mysq_fetch_row($result) // where result is the answer from you login details
$_SESSION['member'] = $row;

Now you can use SESSION on any page on the site. If you site takes on large numbers of hits ensure you only pull out the fields from the DB that you will require in subsequent pages.

I.E

A username can be retrieved via $_SESSION['member']['username'].


Ibbo
__________________

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

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

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

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

Linux user #349545 :
(GNU/Linux)iD8DBQBAzWjX+MZAIjBWXGURAmflAKCntuBbuKCWenpm XoA7LNydllVQOwCf
ibbo is offline
Reply With Quote
View Public Profile Visit ibbo's homepage!
 
Old 07-05-2006, 02:57 AM Re: session based members area help
pappasaa's Avatar
Ultra Talker

Posts: 268
Trades: 0
thanks. I will read that tutorial tonight and see if it gives me some ideas.

Quick question... is there any cool features you would like to see offered that sites like myspace, friendster, geocities...ect. do not offer. I am working on a few things now that most of the other sites don't have....yet....but nothing that is going to make my script stand out. all ideas are welcome.

I don't want to share what is in the works as of now because i do not want other sites to take my ideas and say they did it first. Thanks again
pappasaa is offline
Reply With Quote
View Public Profile Visit pappasaa's homepage!
 
Old 07-05-2006, 03:19 AM Re: session based members area help
pappasaa's Avatar
Ultra Talker

Posts: 268
Trades: 0
I am using a script I found phpfreaks for my passwords....


Code:
function makeRandomPassword() { 
  $salt = "abchefghjkmnpqrstuvwxyz0123456789"; 
  srand((double)microtime()*1000000);  
      $i = 0; 
      while ($i <= 7) { 
            $num = rand() % 33; 
            $tmp = substr($salt, $num, 1); 
            $pass = $pass . $tmp; 
            $i++; 
      } 
      return $pass; 
} 
$random_password = makeRandomPassword(); 
$db_password = md5($random_password);

My surrent regestration page uses md5 encryption when it makes a random password. Cool script i found an am glad to share it. The script works for me right now but I might want to change the entire register script later. What do you think?

Random Password on PHP Freaks: ( got to give a credit because its not my script )
http://www.phpfreaks.com/quickcode/R...nerator/56.php
pappasaa is offline
Reply With Quote
View Public Profile Visit pappasaa's homepage!
 
Reply     « Reply to session based members area help
 

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