Passwords On Files

I was wondering how I can make a password check for a file. I mean how do I get a program to request a password to open a program such as a quiz game or a file full of addresses.

I can get it to ask for the password using the INPUT command but I can't get it to restrict access if the passwords is incorrect. I know that I will have to put all of the passwords in to the QBasic file but how do I make it check and restrict access?

I would kindly appreciate any help you can offer me.

Comments

  • : I was wondering how I can make a password check for a file. I mean how do I get a program to request a password to open a program such as a quiz game or a file full of addresses.
    :
    : I can get it to ask for the password using the INPUT command but I can't get it to restrict access if the passwords is incorrect. I know that I will have to put all of the passwords in to the QBasic file but how do I make it check and restrict access?
    :
    : I would kindly appreciate any help you can offer me.
    :
    How about something like:

    If input$<>password$ then SYSTEM
    or
    If input$<>password$ then END


  • Thanks mate for the help
    I will see if it works but it should
    I just learnt about the use of the < and > signs today in class
    thanks alot
    I would have been stuffed without it!


Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories