-
newbie: authentication
Ben, Thank you so much, it works perfectly now :-) One more thing, though: The page in question will be auto-refreshing. Will this mean that I will have to add cookies so that the user does not have to keep logging back in? Many thanks again -- I wish you and everyone a great weekend! :-) John
-
newbie: authentication
Everyone, Thanks so much for your attention to this, and to Ben especially, I really appreciate you taking to time to do that script for me. I will give it a try! Before I had seen it, though, I had found the following tutorial online. I found it really helpful in it's step-by-step format ... http://www.phpeasystep.com/workshopview.php?id=6 ... and I have followed it to the letter. At my webserver, I have created a folder to test it, appropriately named 'test' and I have uploaded the 3 files I created to that directory. The mysql database I made ok using phpmyadmin. When I try to log in, with 'john' and '1234' as it is in the tutorial, I get the following: Warning: mysql_connect() [function.mysql-connect]: Unknown MySQL server host 'myhost' (1) in /home/myhost/public_html/test/checklogin.php on line 9 cannot connect I think perhaps I have specified my local host wrong, could you tell me where I can find out what it is? Or must I first export the database to the test directory? As far as I can see I've configured the rest correctly, just that one detail I am unsure of. Thanks again, John
-
newbie: authentication
Hi Gav, Thanks for your answer, I've done so much searching my eyes are almost bouncing on my desk lol :-) What I find is that so many of the scripts assume that the reader knows a bit, and I really don't, lol. Also, most involve the registration process and I don't need that as I will be assigning randomly generated passwords. Basically what I need is to know how I would manually configure a mysql database and enter the required username/password information for each user. Then how I can implement that database for my page. I'm finding that I can't really get myhead around the scripts that I am finding, they assume too much knowledge and are very unclear. Thanks again, John
-
newbie: authentication
Hi there! I am seeking to have a secure page on my website that is only accessable for users who log in. Ideally I would like this to be a box in which users enter a code (a ticket number, say) in order to view the page. After searching and searching the internet my head is totally confused and blown away, and I am urgently seeking some clarity lol. My questions are: 1). can you offer me some guidance as to how I would configure a mysql database which would hold the necessary information? Really this is only one piece of information, the entry code, for each user. For example: user1: 111111 unser2: 222222 The codes will be assigned by myself straight in to the database, so there is no need to have any registration possibilities. 2). how would I apply this to my webpage so that to access it, the specific user must enter his or her number that I have assigned? I don't know if this matters (I am new to this stuff) but the page will be auto-refreshing so the user would have to stay logged in. Thank you for taking a look at this for me, and I really appreciate any time taken in order to help. regards, John