Page 1 of 1

MySQL/PHP to get login ID

Posted: Wed Oct 10, 2018 10:46 pm
by BethlehemOffice
Ok, I've got my login set up and working (finally). Unfortunately WYSIWYG only allows for what 14 fields and I need a bunch more than that.
So I created another table and the userID is the same between the two tables so I can just pull from both. I need an alternate solution because when I try to add php in WYSIWYG I get some strange results and would rather just code outside WYSIWYG for these couple of pages.

My question is how do I get the current logged in userID from the WYSIWYG log in? Is it stored in a cookie, a session?

Then end result would be the user logging in and seeing all their personal information (30 fields at this point - maybe more) based on their login credentials.

Re: MySQL/PHP to get login ID

Posted: Thu Oct 11, 2018 6:23 am
by Pablo
Unfortunately WYSIWYG only allows for what 14 fields and I need a bunch more than that.
What makes you think there is a limit? I am not ware of such a limitation.

If you want more control over the layout of the form then you can convert it to a standard form.
i need an alternate solution because when I try to add php in WYSIWYG I get some strange results
I doubt that this has anything to do with WWB. Maybe there is an error or conflict tin your code?
My question is how do I get the current logged in userID from the WYSIWYG log in?
The ID is not stored in a session, only the username. But you can modify the code of the login form to also store the ID is a session variable.

Re: MySQL/PHP to get login ID

Posted: Thu Oct 11, 2018 2:09 pm
by BethlehemOffice
In the help it shows 5 extra fields and I thought that it said "The following SQL query generates a table with THE 5 extra custom profile fields:" my bad. But I can't change the names of the fields but it's good to know I can add as many as I want.

It's php and WYSIWYG and my provider that I'm having a problem with. I keep getting extra code at the beginning of my pages that stops php from working. That's why I prefer to just code these pages directly. But thanks for pointing out the convert to standard form. I sorta knew it was there but hadn't looked into it.

THANKS!!! I'll check out modifying the login form code.

Re: MySQL/PHP to get login ID

Posted: Thu Oct 11, 2018 2:42 pm
by Pablo
I keep getting extra code at the beginning of my pages that stops php from working.
This either means that PHP is not supported or the page extension is not set to PHP.