Jump to content

Asking for a variable once?


Recommended Posts

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

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

$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 by TheTex
Link to comment
Share on other sites

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...