Global variable declaration issue

Hello, Need assistance with global variable. In the login window $conn is declared as global variable so that it can be used in the change password function. I have tried using sc_set_global($conn); and [conn] = $conn; and updated conn variable as OUT but in the change password script [conn] is = 0.

I have attached example of login code and of the change password code example.

Thanks in advance for assistance!

LOGIN.rtf (1.4 KB) change_pswd.rtf (596 Bytes)