knowledge_6 Posted February 24, 2007 Share Posted February 24, 2007 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.. Quote Link to comment Share on other sites More sharing options...
simcoweb Posted February 24, 2007 Share Posted February 24, 2007 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 Quote Link to comment Share on other sites More sharing options...
knowledge_6 Posted February 24, 2007 Author Share Posted February 24, 2007 sweet.. thanks.. i will try and script a simple php.. shouldn;t be that long.. i guess i have to use some delimiters to determine the login and password Quote Link to comment Share on other sites More sharing options...
simcoweb Posted February 24, 2007 Share Posted February 24, 2007 Here's exactly what you're looking for with instructions and everything: http://www.mariovaldez.net/software/sitefilo/ Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.