June 22, 200619 yr Is there a way to have someone log into a windows 2000 hosted website, capture the username and password via php, and then dynamically redirect the user to a page based on the username and password entered
June 25, 200619 yr Yes there are several ways to achieve passing login details to/from php and filemaker. Can you tell us a bit more about what you require? It seems as though you are looking to pass login details from a website through to a database. Is this correct? Or are you thinking more along the lines of NT or AD account credentials being passed to the database? Steve
June 26, 200619 yr Are all pages on the same server? In Filemaker database you can have a field that identifies the level of the person logging in. Fred, Steve and Sally are Admin so they get a login security of 5 Mark, Sam and Andrea are general users so they get a login security of 3 Then you get your PHP code for the login: UserID: Password: The "loginok.php" page will check the database and refer the person to the correct page based on security level. $viewcustomer=new FX($serverIP,$webCompanionPort); $viewcustomer->SetDBPassword($db_password); $viewcustomer->SetDBData('WebClient_.fp5','ForWeb'); $viewcustomer->AddDBParam('userid',$CustomerID, 'eq'); $viewcustomer->AddDbParam('Password',$Password, 'eq'); $viewcustomerResult=$viewcustomer->FMFind(); foreach($viewcustomerResult['data'] as $key=>$viewcustomerdata); And then: $security = $viewcustomerdata['security']; $Page1 = "somepage.php"; $Page2 = "anotherpage.php"; if($security==5) {header("Location: $Page1");} if($security==3) {header("Location: $Page2");} or some variations for the above.
June 27, 200619 yr Author I have several windows 2000 user accounts set up through Local Users and Groups on my Windows 2000 server. I also have a user profile table set up in FileMaker that will contain among other things each user's username and password (which will be the same as the usernames and passwords set up on their Windows account). I want to somehow capture the username and password being used to initially login to Windows account with and then match that up with a user listed in the FileMaker user profile table and then direct that user to the appropriate page for his/her profile. Edited June 27, 200619 yr by Guest
June 27, 200619 yr This deals with the issue of redirection: then take what I offered above and make the modifications. Instead of basing redirection on security in my example, you would have a url field with their profile in your filemaker user profile table. If the login is successful then: $newpage = $viewcustomerdata['ProfileURL']; header("Location: $newpage"); Capturing their windows login information I am not sure of. But I might suggest a login page rather than doing it automatically for security reasons (ie someone walks up to a logged in computer).
July 12, 200619 yr Author OK, I found the answer to my main problem, which was capturing the username and password using php. I'm storing each one in a session variable, but it could also be stored in a regular variable. For capturing the username, you could use: $_SESSION['username'] = $_SERVER['REMOTE_USER']; or you could use:$_SESSION['username'] = $_SERVER['PHP_AUTH_USER']; And for the password, use: $_SESSION['password'] = $_SERVER['PHP_AUTH_PW'];
Create an account or sign in to comment