Link Worth

How i will check that user is, logged in or not. i want to make it a function and i want to use in each page and after login i want to go in current page(same page. where i was working)

Written on July 22, 2007 – 6:59 am | by Prakash Thapa |

For this we can use the session object($_SESSION). When the user login with his/ her user name and password, usually we check those to ensure for correctness. If that user name and password are valid one then we can store that user name in a session and then we can very that session variable has been set or not in a single files and we can include that file in all pages.

You can also use a header based approach, i.e. have a PHP include file which does necessary checking on user logged in or not. Include this file in other files.

Related Posts

Put your related posts code here

Post a Comment

About Me

I am Prakash Thapa a Freelancer Web Programmer and this is my personal blog. Since from the beginiing of my journey in this Web World I have learned so many things by self-study. And have completed so many web-projects. Currently I am running my own web-house "ITWeb Developer" at Kathmandu, Nepal... More

Want to subscribe?

 Subscribe in a reader Or, subscribe via email:
Enter your email address:  

Our Sponsors


Translate This Blog

English flagItalian flagGerman flagSpanish flagFrench flagPortuguese flagJapanese flagKorean flagChinese flagArabic flagRussian flag
Find entries :