passwords

This is a discussion on "passwords" within the PHP Forum section. This forum, and the thread "passwords are both part of the Program Your Website category.



Go Back   Webforumz.com > Main Forums > Program Your Website > PHP Forum

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Mar 6th, 2007, 22:21
New Member
Join Date: Mar 2007
Location: UK
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
passwords

Hi,

I have created a online photo album, is it possible for me to password this???

I know you can password html files, but i dont know how to / if you can password photo albums and such.

Hope someone will be able to help.

Cheers
Simon
Reply With Quote

  #2 (permalink)  
Old Mar 7th, 2007, 00:54
karinne's Avatar
SuperMember

SuperMember
Join Date: Jan 2007
Location: You know where
Age: 31
Posts: 4,617
Thanks: 0
Thanked 0 Times in 0 Posts
Re: passwords

Of course you can ... you can use either PHP or ASP / .NET. Check with your host which it supports and which you want to use and I'll move the thread to the right section so you can get more help
Reply With Quote
  #3 (permalink)  
Old Mar 7th, 2007, 10:21
New Member
Join Date: Mar 2007
Location: UK
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Re: passwords

Thanks,

My web host will let me use PHP, so i think thats probably the best option, so any help is appresiated on this.

Cheers
Simon
Reply With Quote
  #4 (permalink)  
Old Mar 7th, 2007, 12:14
karinne's Avatar
SuperMember

SuperMember
Join Date: Jan 2007
Location: You know where
Age: 31
Posts: 4,617
Thanks: 0
Thanked 0 Times in 0 Posts
Re: passwords

Have a look at Joe2torials' PHP section ... there's a few good scripts in there as well as an Admin section one.
Reply With Quote
  #5 (permalink)  
Old Mar 28th, 2007, 10:18
Reputable Member
Join Date: May 2006
Location: Northampton, UK
Posts: 399
Thanks: 0
Thanked 0 Times in 0 Posts
Re: passwords

You need to look into the following to begin your journey towards php membership / password systems.

Research;

Basic php syntax
PhP Sessions
The : $_POST['']; variable
The : $_GET['']; variable
Learn how to use phpmyadmin
Understand how MySql works.
Php If else statements.

once you understand that load... this next bit will make sense lol (this is a really basic, ultra fast guide)

1) create a database called "users"
2) Create 1 table and call it "details"
3) within this table create 2 fields "username" & "pasword"

now..... thats the database setup.... sounds easy right? ... it is kinda :P

Now, you need to decide if you want to allow people to register with your site... or if you want to personally controll the users.

If you want total controll, then you should add the usernames and passwords to the database manually in phpmyadmin.

Assuming you want to allow registration, your going to need a registration form. Ostensibly a registration form is just an html form that posts to a php script.

once the php script (aduser.php) recives the desired username and password in the form of;

$username = $_POST['username'];
and
$password = $_POST['password'];

you can begin adding the info to the database.... you need to look into sql queries here and how to use them inside php.

Id also suggest encrypting the password before storing it... use md5($password); for this.

tehers lots of things you can add, like two password fields and a check to make sure they match etc etc.

But once yourve got a registration form that adds users to your database you really need to start looking at php sessions, and start creating a log in form.

The log in form is again a html form that posts to a php script.

The php script checks to see if the username exists in the database, and then chcks to see if the password entered is the same as the password referenced by the username in the database.

Assuming these checks are passed, your script will start what is known as a php session, this will keep the user logged in as they move around the varous pages of your site.
Reply With Quote
  #6 (permalink)  
Old Apr 1st, 2007, 23:19
Reputable Member
Join Date: Jul 2006
Location: Baldock
Age: 20
Posts: 447
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Aaron1988 Send a message via Yahoo to Aaron1988
Re: passwords

Hey i know a way but do you want a Login and password box?

or Just Password cause if you just want a password then if you have hosting you can use the "WEBPROTECT" addon that comes with most hosting companies.

It will password protect a folder i not sure if it will protect certain files if it doesnt then all you do is transfer all you photoalbum files to a new folder called photoalbum then use the "WEBPROTECT" to password protect that folder and then the photo album will be password protected.

But up to you and also you can do it in php like Accurax said and Karinne but up 2 you and cause your a beginner the easiest way for you to do this is "WEBPROTECT" but its your site so up to you how you want it dispalyed

Hope this Helps you for what you wanted?

Thanks
Aaron
Reply With Quote
Reply

Tags
passwords

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Encrypting passwords - 2 way or 1 way? djeyewater PHP Forum 3 Mar 30th, 2008 16:09
md5 passwords scottw PHP Forum 2 Jan 14th, 2007 15:07
change admin passwords? swiftmed PHP Forum 4 May 23rd, 2006 12:34
Passwords on pages phil19 Hosting & Domains 9 Mar 25th, 2006 08:32
databases, usernames and passwords.. benbacardi Classic ASP 3 Aug 11th, 2004 20:03


All times are GMT. The time now is 05:17.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43