Jump to content


Photo

Login to Password Protected Directories using PHP and MYSQL


  • Please log in to reply
4 replies to this topic

#1 Wildhalf

Wildhalf
  • Members
  • PipPipPip
  • Advanced Member
  • 101 posts

Posted 20 August 2006 - 08:48 AM

Hi All,

My problem is i am new to PHP but understand it. What i am trying to do is create a login using PHP and MySQL.

The database is already made and working for another PHP program i downloaded but the code is encoded and i can't read it.

SO i need help in protecting a directory maybe with .htaccess and using a mysql database with the passwords or is there any other way..

thank you

Kieron

#2 GingerRobot

GingerRobot
  • Staff Alumni
  • Advanced Member
  • 4,086 posts
  • LocationUK

Posted 20 August 2006 - 08:52 AM

Why is that you need to password protect directories? A login system would usually use sessions.

There are a couple of tutorials on here which could help you:
http://www.phpfreaks...orials/40/0.php
http://www.phpfreaks...orials/65/0.php

They show how to create membership systems.

#3 Wildhalf

Wildhalf
  • Members
  • PipPipPip
  • Advanced Member
  • 101 posts

Posted 20 August 2006 - 10:57 AM

I want to password protect a directory as i already have a database in use with a PHP script and i want to use the login info from this database to let my users login to another private area...

#4 onlyican

onlyican
  • Members
  • PipPipPip
  • Advanced Member
  • 921 posts
  • LocationHants - UK

Posted 20 August 2006 - 11:37 AM

A members area will do the trick
Look at the tutorials posted by GingerRobot
Tell me the problem, I will try tell you the solution

#5 Wildhalf

Wildhalf
  • Members
  • PipPipPip
  • Advanced Member
  • 101 posts

Posted 20 August 2006 - 05:00 PM

Thank you for your help GingerRobot!

I used http://www.phpfreaks...orials/40/0.php tutorial. It is missing a few bits and pieces that can be got from the other tutorial.

But i now have the PHP running completely all i have to do is modify the login area and that

thanks again

Kieron




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users