User login takes them to specific area


#1

Thanks to rlparker for suggesting that I make a new thread. :slight_smile:

I have a videography business and on my website I’d like my clients to be able to log in to their own area of the site to view their videos/pictures. Using .htaccess I set up individual links to email the customer so that they could log in, but I’d like to have a “Log In” link on my home page that, when clicked, prompts for a username/password. If the user/pw matches one that I’ve set up in MySql, I’d like for the browser to take them to their own site.

This is very difficult to explain. :wink:

Thanks for any info!


#2

it seems you want to implement a login page.

you can try my codes. www.ad-wordz.com/login.zip

Save [color=#CC0000]$97[/color] (max discount) on dreamhost plans by using promo code: [color=#CC0000]97CRAZY[/color].


#3

Thanks for the script, but I think I need a little more direction…like what do I do with this script? :slight_smile: Sorry, I’m a beginner. Do I need to have an HTML document point to this at some point in the page, or is this stand-alone? Do I have to create a separate database for this script to use?

Thanks a lot for all the help!

I did open that script in Dreamweaver, though, and I noticed you misspelled “password”. Just letting you know!


#4

i believe you already have a database which contains customer id, password, and the name of their individual web page. you need to specify the mysql server name, user name and password in order to connect to the database.

the script starts with a html form. user enters the id and password in the form and click submit. the script will post the values to the same page. after user clicks submit, the script will retrieve the values and connect to database. you may need to modify the sql query according to your table. if user id and password match with the record in the database, script will redirect user to their individual page.

I think I should write more comments :stuck_out_tongue:

Save [color=#CC0000]$97[/color] (max discount) on dreamhost plans by using promo code: [color=#CC0000]97CRAZY[/color].


#5

I changed something in the script. you may want to download a new one. www.ad-wordz.com/login.zip

maybe my script is too messy. but it gives you the idea how to do the login page.

  1. create a form. get input such as id, passwod from user
  2. user clicks on submit and post the value to next page (you can also post to the same page)
  3. in the next page, retrieve the value and connect to database
  4. match the value with the records in the database
  5. if they match, redirect user to user’s page.

Save [color=#CC0000]$97[/color] (max discount) on dreamhost plans by using promo code: [color=#CC0000]97CRAZY[/color].