bundyxc Posted January 5, 2009 Share Posted January 5, 2009 Is there a way to just ask the user for a variable ONCE? I need to save their login data.. is there a way to do this? Maybe I could save it to a textfile, and read? Any thoughts? Global $arr[2] $arr[0]="hip" $arr[1]="hip" ;^^ hip hip array. ^^ Link to comment Share on other sites More sharing options...
mikeit Posted January 5, 2009 Share Posted January 5, 2009 Is there a way to just ask the user for a variable ONCE? I need to save their login data.. is there a way to do this? Maybe I could save it to a textfile, and read? Any thoughts?im not sure quite what to do as you can guess but how does html use its remember me type things for when you log in, could be a usefull for you?? Link to comment Share on other sites More sharing options...
TheTex Posted January 5, 2009 Share Posted January 5, 2009 (edited) $file = FileExists ("c:\first.txt") if $file = 0 then inputbox("Question", "Enter variable") _FileCreate("c:\first.txt") endif Looks if file.txt exists, if it does then it will return if not it will ask for their input. You can use _filewriteline() to write the variable to the text and use _filereadline() to retrieve it Edited January 5, 2009 by TheTex Link to comment Share on other sites More sharing options...
bundyxc Posted January 6, 2009 Author Share Posted January 6, 2009 im not sure quite what to do as you can guess but how does html use its remember me type things for when you log in, could be a usefull for you?? If a webpage is remembering something, it's obviously not just HTML, seeing as how HTML can't do that. They would have to be using javascript/php/etc. $file = FileExists ("c:\first.txt") if $file = 0 then inputbox("Question", "Enter variable") _FileCreate("c:\first.txt") endif Looks if file.txt exists, if it does then it will return if not it will ask for their input. You can use _filewriteline() to write the variable to the text and use _filereadline() to retrieve it Thanks, I'll give it a shot. Global $arr[2] $arr[0]="hip" $arr[1]="hip" ;^^ hip hip array. ^^ Link to comment Share on other sites More sharing options...
TurionAltec Posted January 6, 2009 Share Posted January 6, 2009 Look at Iniwrite and Iniread functions. They will allow you to easily store several values in the same file. Also, to keep from storing a password as plain text, you may wish to use _StringEncrypt to encrypt / decrypt the string before storing. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now