NetTalk Central
NetTalk Web Server => Web Server - Ask For Help => Topic started by: tglomb on March 22, 2014, 07:04:49 AM
-
I need to store some global values a user configured in a session so that the next time he uses the program it must not be done again. These values must be persistent for ever and some of these values I must read out at the very first possible point, before any website is openend, especially before the Login. This is like having an Ini file/registry setings for Win32 progs which I read out at mainframe procedure setup embed.
These values are workingplace/device related, because some of it I must use before the program knows which user has logged in.
So, how to Cookie it ? Which embeds I must use ? Any hints and ideas are appreciated.
TIA. Ciao Thomas
-
HI. How would you know who the user was before the login?
-
I neeed to "remember" some config values on a per device basis which are equal for all users working at that device.
Ciao Thomas
-
Could you store by ip, mac, computername or some other id depending on your setup and environment?
Peter
-
>I neeed to "remember" some config values on a per device basis which are equal for all users working at that device.
you need to store computer name or mac address for this and then compare when login user.
/Robert
-
Hi Peter and "I Robot" (sorry, couldnt resist..)
good idea to have a table in the dict which holds these globals. Thanks. The MAC address would be the unique identifier for a device.
But which is the very first embed at which I can read out the MAC and then get the record with the device globals BEFORE anything else happens ? That means directly after a user typed in the IP, hits [Enter] to start the Web program und the first request tooks place.
Dumb question: hase every Internet aware devive a MAC (i and Android Phones ect.) ?
I wished I could store a good ol' CFG file at the devices..
TIA, Thomas
-
>I wished I could store a good ol' CFG file at the devices..
Well, you can, sort of. But to do so you'll have to study how to use SQLite. That's a selfcontained db that can be used on all the devices you mention. And Clarion has support for that.
I have no personal experience but it should definitely be doable.
Peter
-
Cool idea, thanks Peter
-
You could set a cookie on the device, and then with every request sent from the device the cookie will come too.
see
http://www.capesoft.com/docs/NetTalk8/NetTalkWebBasic.htm#Cookies (http://www.capesoft.com/docs/NetTalk8/NetTalkWebBasic.htm#Cookies)