Right now I have a folder called customer and inside this folder I have all the customers names that are secure with htaccess
at the moment I do not have a login page but just direct links for each user
Can I create a login.php file.. with only a user name and password with a small image
Can I enter a username and password but if the user enters the correct user name and password it will direct him to the correct folder?(working with htaccess?)
thanks in advance
Matt
code for file login.html
Code: Select all
<!doctype html public "-//w3c//dtd html 3.2//en">
<html>
<head>
<title>Login Page</title>
</head>
<body bgcolor="#808080" text="#000000" link="#8080ff" vlink="#0000ff" alink="#ffff00">
<form method="post" action="login.php">
<b> Username </b> <input type="text" name="name"><br>
<b> Password </b> <input type="password" name="password"><br>
<br>
<input type="submit" name="Login" value="Login">
</form>
</body>
</html>
Code: Select all
<?php
// These two values are passed from the form ---------------------------
$username = $_POST['name'];
$password = $_POST['password'];
// Change these values to fit your site --------------------------------
$domain = "[url="http:www.punktewolke.de//www.punktewolke.de"]www.punktewolke.de[/url]"; // my domain? correct?
$restrict = "kunden"; // The restricted directory
$pagetitle= "Login; // Title of the Page
echo "<html><head><title>$pagetitle</title><META HTTP-EQUIV=REFRESH CONTENT="0;
URL=http://$username:$password@$domain/$restrict\"></head>";
echo "<body bgcolor=\"#C1C1C9\">";
echo "<center><h2> Login into the Members Area ... </h2>";
echo "</body></html>";
?>