Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

How to create a login to users in PHP

Guest
Aug 05, 2006 Aug 05, 2006
How to create a login for users to access their data, currently I can only see the first user everytime I login even with a different username. I know I need session stuff but don't know how to use, add or where to put them in.
Thanks in advanced.
TOPICS
Extensions
489
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Deleted User
Nov 12, 2006 Nov 12, 2006
Hi

Find this in your login page:

session_register("MM_Username");

and then add a session variable in MX called this:

MM_Username

then on any of your pages that calls from the database make sure that you use the = MM_Username and then you are all set; make sure that the tables have a field to reference the session variable MM_Username.

Cheers
Let me know if you come right!
Translate
Guest
Aug 07, 2006 Aug 07, 2006
You should have your user info in a database. When the user logs in, check the username and password against what's in your database. If they don't match, provide an error. If they do match, you can assign the username to a session variable and display that on the page.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Aug 08, 2006 Aug 08, 2006
Yes but how and where to put the sessions?
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Nov 06, 2006 Nov 06, 2006
How and or where do I put those session variables; In the login page or other pages.
I think "How to" is the big part for me, I am good in ASP but not that good in PHP.

Please help...
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Nov 06, 2006 Nov 06, 2006
I also am wrestling with the same problem. Session variables have not worked. I have determined that if the GET method is used, then the recordset of the users records are there. If the POST method is used, the recordset is blank. It appears to be something inherent in the Log In User behavior.
I am trying to have a customer log in and then only see their particular inventory records. I do not want them be directed to a page with a listing of all the various customers and then select from that. Not suitable at all.
If I find an answer, will let you know.
Thanks and good luck,
Dale 🙂
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Nov 12, 2006 Nov 12, 2006
LATEST
Hi

Find this in your login page:

session_register("MM_Username");

and then add a session variable in MX called this:

MM_Username

then on any of your pages that calls from the database make sure that you use the = MM_Username and then you are all set; make sure that the tables have a field to reference the session variable MM_Username.

Cheers
Let me know if you come right!
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines