PC SOFT

PROFESSIONAL NEWSGROUPS
WINDEVWEBDEV and WINDEV Mobile

Home → WEBDEV 2024 → Login in PHP
Login in PHP
Started by Kim O'Regan, Aug., 26 2010 10:30 PM - 3 replies
Posted on August, 26 2010 - 10:30 PM
Hi
Since Groupware doesn't work with PHP pages, is there any other way to easily handle login and access to pages, or do you have to code it yourself?
Any suggestions how that would look?

Thanks!
/Kim
Registered member
14 messages
Posted on December, 04 2010 - 8:17 AM
Hi Kim

you actually have to code it yourself. But this is a pretty easy thing to do:

- declare some global variables that you will need all along the session (these will be your session variables)

- you have to build a "login" page where you will check user credentials and rights, and initialize your session variables then direct the user to whatever page you need.

- in the Init of each page (best if you include this in your page model), add a couple of lines that test if your current user name is empty. If so, call a global procedure that resets all session variables and then redirect the user to the login page (using PageUtilize in order to reset page contexts)

I hope it helped.

Good luck!
Renaud
Registered member
6 messages
Posted on December, 11 2010 - 6:24 PM
Thanks, I thought it would be something like that but I just got WebDev 16 and it seems like groupware now works with PHP. The RAD also supports CMS, blog, forums etc which should include login (at least the "associatif" RAD. It will be a lot easier when the english version arrives... ;-)

Regards,
Kim
Registered member
9 messages
Posted on December, 13 2010 - 9:22 AM
Cool. Good for you!
I wanted to get Win/WebDev 16 before year end but that will not be possible. I hope the new version is worth it - apparently you already found what you are looking for :o)

Have a good one!
Renaud