Jump to content

login/password page


knowledge_6

Recommended Posts

aight i've been reading and searcing a lot on login and password screens... and i would not post if i didn';t search yet so here is my question..

 

pretty much every tutorial, question, post regarding this issue has to do with a database (mysql)

 

my question is, if you do not have access to a database and all you want is a simple ONE USER NAME, ONE PASSWORD screen to access a part of your website can you do it with strictly using PHP?

 

pretty much i am making a site for a friend's wedding and he doesn;t want random people RSVP ing so to gain access to the form to RSVP you have to put in the login and password (which will be generic for all who are invited and it'll show on the invitation on what the login and password is.).

 

is there a way to do this without a database?

 

i remember i did an assignment in school where you make an XML document with the password and login, and the PHP script parses the XML document and uses the getElement to get the password and login but i cannot seem to find the assignment... and i remember i never got it to work becuase any login and password worked.

 

so if anyone can help that would be GREAT..

 

 

Link to comment
Share on other sites

You can use the ugly gray box .htaccess method if you're needing just one common username/password shared by all. Or, for the prettier login page, you'd use PHP.

 

It's not necessary that you have a database. You can use a textfile for the storage of the username/password combo. It's not as secure but for your purposes it could work.

 

In those tutorials, just replace the references with the database to using the fopen, fread and fwrite functions built into PHP. There's a bunch of tutorials on how to open files, write to them and then close 'em up.

 

You could most likely find exactly what you're looking for over at www.hotscripts.com but that wouldn't teach you alot. If you want to code it yourself then work up some preliminary code and post it here when you have trouble :)

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.