I would like to add a username and password to a link in a website I'm building so that only certain people can access a page. Can anyone help me with some code to do this..
You can configure the server itself to demand a username and password: for example, apache can be configured through .htaccess. Or you can use server-side code (such as PHP, ASP, Java, Perl, and many others); typically in conjunction with session management.
Without being rude, I suggest you use Google to search for relevant code. There is plenty available, and whilst Tek-Tips members are often happy to help debug code, we'd prefer not to write your code for you from scratch. We'd much rather give you advice that will point you in the right direction, helping you learn, and enabling you to help other future Tek-Tips users.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.