How to pass a variable from one app to another?
May 7, 2021 14:12:11 GMT -5
Post by donnybowers on May 7, 2021 14:12:11 GMT -5
Let's say, for example, I have program 1 and program 2. I want to link a user who is logged in on program 1 to program 2 and I don't want them to have to log in again to use certain features that require login. How can I pass a variable that can be used to tell program 2 that my user who came from program 1 is already logged in? All I'm looking for is how to pass a piece of text or a number in a variable from program 1 that I can then process in program 2
I need a secure method like the POST method in PHP as opposed to the GET method which isn't secure because the variable is passed in the address bar where anyone can see it. With the POST method it's passed via HTTP header. I've looked through the RunBASIC help file commands and functions and haven't seen anything that looks like it will do this. But I can sometimes look right at something and still miss it.
LB has a similar function, I believe it's called COMMANDLINE$ or something like that. I guess I haven't used it in a while but Turbo BASIC had it and I'm pretty sure GWBASIC and BASICA had it too. These days I tend to pass variables in LB using a temporary text file, but you can't do that with RunBASIC because you don't know if another user will be linking to the same program at the same time and the wrong person might get the authority from it to use features meant only for logged in users. You really need something like a COMMANDLINE$ or POST command to pass a variable that's invisible and unaccessable to those it's not intended for.
'i.e.
if loggedin<>0 then button #postComment, "Comment", [comment]
I need a secure method like the POST method in PHP as opposed to the GET method which isn't secure because the variable is passed in the address bar where anyone can see it. With the POST method it's passed via HTTP header. I've looked through the RunBASIC help file commands and functions and haven't seen anything that looks like it will do this. But I can sometimes look right at something and still miss it.
LB has a similar function, I believe it's called COMMANDLINE$ or something like that. I guess I haven't used it in a while but Turbo BASIC had it and I'm pretty sure GWBASIC and BASICA had it too. These days I tend to pass variables in LB using a temporary text file, but you can't do that with RunBASIC because you don't know if another user will be linking to the same program at the same time and the wrong person might get the authority from it to use features meant only for logged in users. You really need something like a COMMANDLINE$ or POST command to pass a variable that's invisible and unaccessable to those it's not intended for.