![]() Not in their own code, nor in the generated code. I guess they don’t want the risk of breaking code. ![]() SC is over 10 years old and it needs freshing up here and there. It don’t check URL to update or not, and always update session var.Īs suggestion to NetMake, they should take note on this, and if a global var is defined just as GET, then they must sure in session is cleared, or directly not use session (better approach) If global is session, it works as expected. Obviously, this way, you have to control with isset() if $_GET is passed and die() if not, as in any PHP. SC just update this var in SC session if you pass this variable in URL. Internally SC saves this var as a session var, but ignore it. SC asks for this var on execution as with every global from dev but ignore the value passed, just if I call blank app like /bln_testvars/?prueba=fromGet echo prints fromGet. I did some tests on a blank app, with this code. Data is passed in URL just when you force to pass as variable. In fact if you redirect to other applications while using global variables then you will see that these are not passed in the url.Įxactly. The mentioned article is not realy relevant imho as this is only one of the ways to pass data. But you can also post data and use $_POST. The fact that the data is in the url and thus visible. ![]() But it’s very well possible that it’s not the best way, you learn to work a certain way ‘because it worked the previous time’. That’s why I always pass the needed globals using sc_redir and don’t trust the $_Session. Useually you need to refresh to see the latest status of the global variable. Other problem is that if you set a global variable and do a sc_redir without these parameters these are not becoming available. The inconsistancy is that if you want to pass a global variable by sc_redir you must not use the brackets. I know that if you pass parameters with sc_redir you will create new global variables in the called application. However, loads of times I cannot get access to the vars using $_SESSION and I need to use $_GET. The session option with the global variables has always been a question for me. Now I can give them a link for this topic. Sorry for the lengthy discussion about sessions, but many people ask all the time about browser tab variable interactions. Somebody at scriptcase really needs to totally rework the sc_redir paradigm. Because of the way that each “app” is treated, it forces the programmer into using many more global (session) variables, or hassling with lots of hoops to launch another “app”. I do not think that the options in the global variables settings do anything (except for In/Out). From what I have seen, if you use square brackets to reference a variable anywhere in your code, it becomes a session variable.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |