after designing a member area in my page i was now locked with this problem. i want each member, have his own data(like his own profile,his own messages etc) presented to him any time he is logged in. pls i will be very grateful if some one can help me

Recommended Answers

All 2 Replies

Use php session.

It's easy. If you have MYSQL database, then, when user register himself create a code and store it in database eg:

$code="";
$char="QWERTZUIOPASDFGHJKLYXCVBNM0123456789qwertzuiopasdfghjklyxcvbnm";
$length=15;
for($i=1;$i<=$length;$i++){
$number=mt_rand(0,(strlen($char)-1));
$code.=$char[$number];
}

And also, create a map. EG. if code is AhfIOGF12, then it saves this code in database, and create a map in map "user maps". And then, in this map, you add what user has, his images... And when he's logging in, then create cookie/session with this code, and then, when he's logged in, just open this map and read something from it.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.