Search found 8 matches

by gosponTarik
Mon Jul 18, 2011 5:09 pm
Forum: Tutorials
Topic: User id
Replies: 20
Views: 3578

Re: User id

jacek wrote:Oh I see ! Well you could use the username to get the user id from the database. I would probably create a new function to get the user id and some other basic information based on the username, and store the result of that in the session.



Thanks, I'll try that.
by gosponTarik
Sun Jul 17, 2011 9:33 pm
Forum: Tutorials
Topic: User id
Replies: 20
Views: 3578

Re: User id

jacek wrote:Have you looked at the login tutorials ? Putting it basically, you need to add the code form that.


In one tutorial you use $_SESSION as ID in other $_SESSION as username, thats why I don't know how to do it. :?
by gosponTarik
Sat Jul 16, 2011 8:07 pm
Forum: Tutorials
Topic: User id
Replies: 20
Views: 3578

Re: User id

jacek wrote:In the login tutorials I stored the user of of the logged in user in the session, this was just to simulate someone being logged in


I know that, i was wondering how can i instead of simulating, use session as real user is logged in? what code should I add?
by gosponTarik
Sat Jul 16, 2011 7:36 pm
Forum: Tutorials
Topic: User id
Replies: 20
Views: 3578

User id

Hi, me again.

In User Profile tutorial you entered $_SESSION['uid'] = 1; in init.inc.php file.
I was wondering, how can i get that id from user_id in database. So if user with user_id = 43 login in, write his id instead of this 1?
by gosponTarik
Sat Jul 16, 2011 12:03 pm
Forum: Tutorials
Topic: Two in one
Replies: 5
Views: 997

Re: Two in one

OK, now I'm stuck, i just add some new registratio fields, write them to user.ini.php file and when I fill form a got totaly wrong iformations in my db. Only Username and email are on right place, all other is mixed. [syntax=php]mysql_query("INSERT INTO `users` (`user_username`, `user_password`...
by gosponTarik
Sat Jul 16, 2011 11:36 am
Forum: Tutorials
Topic: Two in one
Replies: 5
Views: 997

Re: Two in one

Curenty I'am working on registration. Hope there wont be problems 8-)
by gosponTarik
Sat Jul 16, 2011 11:06 am
Forum: Introductions
Topic: Hello
Replies: 3
Views: 938

Hello

Hello everyone, my name is Tarik.
Hope i'll learn a lot from this tutorials and this site :)
by gosponTarik
Sat Jul 16, 2011 11:00 am
Forum: Tutorials
Topic: Two in one
Replies: 5
Views: 997

Two in one

Hello everyone, I complete User Profile (with avatar) and System Registration (with cookies and email validation) tutorials. Now I was wondering how can I make one just one system, so users can register, get email validation code, connect to their profile? Hope you'll understand what a wrote up there