| Comments |
| Joe posted on 2007-12-06 16:59:31 |
| If you look at the 3 gray boxes above with the code. the first gray box should be pasted in a new file called passwords.php the second gray box is the form where the user will type the username and password and all the code from that box should be saved in a new file called login.php. so far you have two files and they should both be in the same directory on the webserver. then all you have to do is open up every page that you want protected by the users password you need to paste the 3rd gray box above all other text in that file. You should have a working login now. open up the passwords.php and under all of the user arrays you paste what Dan told you above on 2007-7-27 and then his next step says to add another line so keep reading his instructions, he knows what he is talking about. |
| Spencer posted on 2007-12-03 00:55:40 |
| I would like u to make me a php login thing. I cant get it to work. I need you to make it so when users log in they redirect to their own page. And also when, say ex. the go to home.php and they r not logged in, it will ask them to, then when logged in it will go to home.php Spencer |
| Joe Again posted on 2007-11-30 00:19:11 |
| i would like to know how to redirect a user to the home page if they have not logged in yet. right now if they click on a restricted area they go to a page with only the login.php form on it. some users would get lost if they had this. |
| Joe posted on 2007-11-30 00:17:38 |
| Great Tutorial. I had this up and running in about 15 minutes and im a complete noob. I am using this on Ubuntu 7.04 with apache 2.2. |
| Hasan Mahmud Riyad posted on 2007-11-18 08:26:30 |
| Hello there, thank you for your valueable effort. i need some suggestion about PHP and SQL. i need to create a user authentication after successfull authenticate user have to open specific page, and no one (no user) could not open or read that page. what should i do? Have any suggestion ...:) ------------------------- Veselin: First, you can create a new ARRAY with pages for each username $URLS["page1.php"] = 'username1' Then on top of each page you need to create a function which checks if the username belong to that page. $currentPage = 'page1.php'; if ($URLS[$currentPage]=$_SESSION["logged"]) { echo "Allowed"; } else { echo "Not Allowed"; }; For each page you need to change the $currentPage variable to page name. |
| ranu posted on 2007-10-17 14:48:27 |
| Can any body solved this problem Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at C:\xampp\htdocs\gandhinews.com\login\news.php:1) in ----------------- Veselin: put session_start() at the very bottom of your php script |
| Dibya Prakash Sahoo posted on 2007-10-08 15:12:49 |
| I want to create a login page for my website. So that registered users can only see my webpages for that I require the concept of session. So please send me the code in php how to create a session. -------------------- Veselin: take a look at http://www.php.net/session for information about how to create session variables and use them |
| Aviv Hadar posted on 2007-10-06 03:33:58 |
| Hi there, The script is amazing ! I was just wondering what has to be done so that every user name is assigned to be directed to a different URL. I have done everything mentioned in the tutorial and also in the comments section of the tutorial page. I haven\'t incorporated this into my completed website yet. I was wondering if you had to charge me to look at my code or what you could do to help me. Basically, I want my clients to be able to login and either be redirected to a page I have built for them, or be redirected to the website that I am working on for them. Please get back to me as fast as you can. ----------- Veselin: please, send me login details and I will take a look and then give you a quote if it is too time consuming |
| Mike posted on 2007-09-30 18:35:07 |
| no no i want to know where in the script do i put the page where my users will be directed after sucessfully log in |
| Mike posted on 2007-09-29 18:55:51 |
| Hi Veselin Im Currently Using your Sites Login System But Im Having A Little bit of trouble with it .. I have everything set up right but I dont know where to put the page i want my users to be directed to after login could you help me? thanks alot Mike -------------------- Veselin: "where to put the page i want my users to be directed to" - this can be any web page on your website |