Php deliberately awkward?
        Posted  
        
            by Jonathan
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Jonathan
        
        
        
        Published on 2010-04-11T13:18:49Z
        Indexed on 
            2010/04/11
            13:23 UTC
        
        
        Read the original article
        Hit count: 372
        
I'm trying to create a login process (as people who have answered my previous question will know)
But it seems impossible to create one process that will work with a desktop app and a standard website.
Instead I have the login function in Usermanagement.php (which is a class, icyntk) but then in another php file (api/login.php) I have:
<?php
require_once '../usermanagement.php';
$m = new usermanage(); 
echo $m->login($_POST['username'], $_POST['password']);
?>
And then I will still need to make another login.php just to be used with the login form on the website. As I can't see anyway to get the result (the echo) of the api/login.php script from the index.php file (where the login form is, it only has HTML in though)
Is there anyway I can simplify this so I only need one login.php?
© Stack Overflow or respective owner