Jump to content

Recommended Posts

Posted

How can I integrate a popup in my website, which asks the people for an username and password, before they can continue? It looks like this:

Username:
Password:
Remember Password

Greetings

Sars!

ps: Whooow, that's a while ago since I came here!


Posted (edited)

This should do the trick as it's also the most compatible with browser settings. Do note that it requires the use of PHP.

http://www.zend.com/zend/tut/authentication.php

the following entry of interest from the url would be this...

<?php 

if ((!isset( $PHP_AUTH_USER )) || (!isset($PHP_AUTH_PW))) {

header( 'WWW-Authenticate: Basic realm="Private"' );
header( 'HTTP/1.0 401 Unauthorized' );
echo 'Authorization Required.';
exit;

} else {

echo "You entered $PHP_AUTH_USER for a username.<BR>";
echo "You entered $PHP_AUTH_PW for a password.<BR>";

}

How you check for valid user/pass info is up to you. You have several ways to try it in the url posted.

... good luck :)

Edited by Chozo4
Posted

Ok, I don't know any coding s***, I only do design... So, maybe a little bit more detailed? I don't understand anything!

Posted
how do u design without coding :P

I make websites with photoshop. Which I transfer to imageready, which I save as html + images which I add text with dreamweaver...

Simple as that! Though my question needs an answer, a simple one!

Posted

well you will need to know coding, as we stated. just read that webpage the was given. you code will have to access some sort of a database or file to check if the username+password is valid.

  • 2 weeks later...
Posted

Thanx a lot!

Though I still got some problems...

My htpasswd file contains this:

dubois:2rBUu9PUNkpa2
Which should be:
dubois:dubois

But if you test it here:

Click Here To Test

It doesn't work!

Anyone please help me!

Grtz,

Sars!

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...