Hello I'm Newbie in PHP Anybody can help me ? here if i click data2.php link from page data1.php, then how can i set must login first before we landing in data2.php. if login success then we can access data2.php Thanks a lot
Hi, you could use a login form and set up a SESSION variable, which would be validated upon access of data2.php. It's kinda easy to set up, you just have to set the action to the same page and check the GET/POST value of your form with a database, or textfile maybe.. You could use .htaccess too, but you would have to do something like putting the data2.php file in another directory. There are plenty of ways to do this kind of login script. Give feedback if you produce something cool!
Here's a nice tutorial to learn about logins and restricted areas: http://www.roscripts.com/PHP_login_script-143.html