Rob,
create a mysql table containing usernames and passwords then do something
like the following:
Hope this helps,
Hugh
<?php
$db=" ";
$table=" ";
$db_user=" ";
$db_pass=" ";
if (!isset($username) or !isset($password))
{
print "<form action=$PHP_SELF method=post>";
print "log in information<br>";
print "Input your name: <input type=text name=username><br>";
print "Input your password: <input type=text name=password><br>";
print "<input type=submit value=\" Log In \">";
print "</form>";
}
else
{
call_user_func('mysql_log_in',$db, $table, $user, $pass); ///// open
database ///////
$query="select * from $table where username='".addslashes($username)."' and
password='".addslashes($password)."' ";
$result=mysql_query($query);
$rows=mysql_num_rows($result);
if ($rows==0) header("location: index.htm"); //////// kicks them out
if ($rows==1)
{
your page code goes here
}
}
?>
----- Original Message -----
From: "Van Andel, Robbert" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, March 05, 2003 3:50 PM
Subject: [PHP] Log In
Is there a handy function in PHP that I can use to retrieve the users
Windows Log in? We are creating an application that will allow users to add
comments to a mysql database, and we would like to be able to track who is
putting the comments into the table, preferably with their windows log in.
Robbert van Andel
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php