Hi,
The site I've got is in html - can I add a section with a password logon using php/MySql - presume I would save the log on page and the pages it links to as php pages - can I mix html and php in this way?
Sandy
Hi,
The site I've got is in html - can I add a section with a password logon using php/MySql - presume I would save the log on page and the pages it links to as php pages - can I mix html and php in this way?
Sandy
yes you can combine them but dude make it easy on yourself just put the files you want to password protect all in one folder and use password protect in cpannel
--cowctcat
Yeah for a simple one, just use the .htaccess (google that) on the secret folder.
If you want the php solution, you need a login form which posts to a php file, which starts a session and lots of other stuff, and you have to be really careful about security (read the php security pages: http://www.php.net/manual/en/security.php).
If you really want, the logon box and page can be in html, with a:
<form action='login.php' method=post>
then you can put all your security in 'login.php', and from there continue to the secure area.
I used something along the lines of this
are you wanting this just for yourself or for members on your site??? if you just want it for yourself then do what was said before and just password protect the pages through cpanel... if you want to use it for members and don't need anything fancy i have one i can pass along to you. it includes a forgotten password form... very small code and easy to implement. doesn't use any sort of verification to stop spam bots from registering on the site but otherwise it is secure.. iv'e had no problems with spambots on my site with it so.
if you want more info email me:
blackpsycho@punishersquad.x10hosting.com
Thanks to everybody for their advice - got an idea now what I can do
regards
Sandy